Hi, Embarrasingly easy for most of you but hey... once a newbie always a newbie I just bought the new php and got the new template for my directory but the title, description, and keywords didn't carry through and I don't know where to put them. Actually the title worked through the admin section. So for the description and keywords I went to header.tpl and saw the following below. If this is the right page to write in the descroiption and keywords can someone show me where to put it in? Use the letters AAAAA and put that in the description area. Use the letters BBBBB and put it in the keyword area. This way I can replace those letters with my real words easy. lol Thank you very much for this help and I am sure I will be posting more newbie/easy threads as I get used to this new upgrade. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1990/xhtml"> <head> {* Document/Browser title *} <title>{if empty ($TITLE)}{$smarty.const.DIRECTORY_TITLE|escape|trim}{/if}{$smarty.capture.title|strip|trim}</title> {* Document character set *} <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> {* CSS Style file *} <link rel="stylesheet" type="text/css" href="{$smarty.const.FULL_TEMPLATE_PATH}/style/main.css" /> {* Custom META tags *} {if $smarty.const.ENABLE_META_TAGS} {if !empty($MetaKeywords)} <meta name="keywords" content="{$MetaKeywords|strip|escape|trim}" /> {/if} {if !empty($MetaDescription)} <meta name="description" content="{$MetaDescription|strip|escape|trim}" /> {/if} {if !empty($MetaAuthor)} <meta name="author" content="{$MetaAuthor|strip|escape|trim}" /> {/if} {if !empty($MetaCopyright)} <meta name="copyright" content="{$MetaCopyright|strip|escape|trim}" /> {/if} {if !empty($MetaRobots)} <meta name="robots" content="{$MetaRobots|strip|escape|trim}" /> {/if} {/if} {* Please keep this line for better version tracking *} <meta name="generator" content="PHP Link Directory {$smarty.const.CURRENT_VERSION}" />
Hey, Ok, you don't need to be editing that file.. what you need to do is go through the other template files such as contact.tpl and ensure that this is at the top of the file: {capture name="title"} - {l}Contact Us{/l}{/capture} {capture assign="in_page_title"}{l}Contact Us{/l}{/capture} {capture assign="description"}{l}Contact Us{/l}{/capture} Code (markup): You will need to check that it exists in submit.tpl, detail.tpl and article.tpl In main.tpl the code should be as follows: {* Calculate title from path *} {capture name="title"} {if count($path) > 1} - {/if} {foreach from=$path item=category name=path} {if $smarty.foreach.path.iteration gt 2} > {/if} {if not $smarty.foreach.path.first} {$category.TITLE} {/if} {/foreach} {/capture} {strip} {if $title_prefix} {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE} {else} {assign var="in_page_title" value=$category.TITLE} {/if} {assign var="description" value=$category.DESCRIPTION} Code (markup): Let me know if you have any problems.
Thanks. OK so I found the main.tpl so do I just type it in as below? And I don't see a place for metakeywords. Thanks. {* Calculate title from path *} {capture name="title"} {if count($path) > 1} - {/if} {foreach from=$path item=category name=path} {if $smarty.foreach.path.iteration gt 2} > {/if} {if not $smarty.foreach.path.first} {$category.TITLE} {/if} {/foreach} {/capture} {strip} {if $title_prefix} {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE} {else}AAAAA {assign var="in_page_title" value=$category.TITLE} {/if} {assign var="description" value=$category.DESCRIPTION}BBBBB
No, you don't need to add any AAAAA or BBBBB into the code.... the code for main.tpl is dynamic, in that the title, keywords and description are taken from the database. main.tpl controls the vast majority of the directory, so whenever a category is requested, it is run through main.tpl and the meta information is collected from the database. HTH
So where do I write in my description and keywords. When I view my page source I see that I only have the title but missing description and keywords. So where do I write that?
Login to your admin and go to Settings -> Search Engine Optimization. You add your meta details there.
Oh jeez! Done and rep for you. I guess it will just take time to get used to this new update for me. THANK!!!