How to have different Title tag for homepage and other pages

Discussion in 'Directories' started by Nima, Dec 24, 2009.

  1. #1
    I had been trying to figure out how to have a completely different Title tag for my directory's homepage and the inner pages.

    I wanted the homepage to be:

    Bam Directory - Always Innovating Website Directory

    While the inner pages looked something like this:

    Universal Medical ID Canada - Bam Directory

    Here is the solutions:

    
    	{php}if(strstr($_SERVER['PHP_SELF'], 'index')) {{/php}
    	{if $category.ID eq 0 and !$list && !$search}
    
           <title>Your Directory - Slogan</title>
    
    {/if}	{php}}{/php}
    
    <title>{$tdescription} {if empty ($tdescription)}{$smarty.capture.title|strip|trim}{/if} - {if empty ($TITLE)}{$smarty.const.DIRECTORY_TITLE|escape|trim}{/if}</title>
    	
    
    Code (markup):
     
    Nima, Dec 24, 2009 IP
  2. msolution

    msolution Well-Known Member

    Messages:
    1,182
    Likes Received:
    123
    Best Answers:
    0
    Trophy Points:
    175
    #2
    is this version 4 ur using?

    M.

    PS: off to bed :)
     
    Last edited: Dec 24, 2009
    msolution, Dec 24, 2009 IP
  3. Nima

    Nima Well-Known Member

    Messages:
    3,489
    Likes Received:
    243
    Best Answers:
    0
    Trophy Points:
    175
    #3
    i already posted the solution. I was just sharing what I worked for me
     
    Nima, Dec 24, 2009 IP
  4. hyper

    hyper Peon

    Messages:
    1,565
    Likes Received:
    214
    Best Answers:
    0
    Trophy Points:
    0
    #4
    phpLD 3.3 and above has already implemented that feature.
     
    hyper, Dec 24, 2009 IP
  5. newlogo

    newlogo Peon

    Messages:
    3,931
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #5
    u can create diff title for diff services with related keyword optimization
     
    newlogo, Dec 24, 2009 IP