This topic is locked
[SOLVED]

 Meta Description Tag

1/5/2012 5:13:47 PM
PHPRunner General questions
author

Greetings to all!
Now that I have my events page creating page titles, thanks to Cristian, I am trying to accomplish the same thing for my Meta description tags. This is what I added to the template for my list page:

<META name="description" content={$custom_description}>


And this is what I added to my 'before display' event page:

$custom_description="";

$xt->assign("custom_description","Search our database of over 36,000 Westies by registered name, Sire,

Dam or breeder then click the word view for the Westie you selectand watch its 5-generation pedigree

dynamically created");


And this is the result.
<META name="description" content=>
Does anyone see what I have done wrong?
I am using phprunner 6.0
Thanks so much!!!

Sergey Kornilov admin 1/5/2012

Quotes seems to be missing. try this:

<META name="description" content="{$custom_description}">
501404 1/5/2012



Quotes seems to be missing. try this:

<META name="description" content="{$custom_description}">



I decided I was trying to make the pedigrees_list harder than I needed to. I just put the description directly into the template file (pedigrees_liar.htm)
For the view page which I wanted to name the actual Westie, I did this:
in the event page 'before display'

$custom_description="";

$thisDogRow_value = mysql_fetch_assoc($thisDogR);

$xt->assign("custom_description","Five generation pedigree for " . $thisDogRow_value['RegName']);


And this in the template pedigrees_view.htm

<META name="description" content={$custom_description"}>


and shock of all shocks, it worked!
Thanks!

501405 1/6/2012

Whoops! I see I left off one of the ". The view page should be

<META name="description" content="{$custom_description}">


as Sergey pointed out!