TinyPortal
Development => Support => Topic started by: sturmkatze on March 22, 2009, 06:19:48 AM
Okay, so I've been up all day driving. Smoke is trailing out of my ears and I have a small question... when I am doing the meta tags in the index template, how do I do the description? I have this below... where do I add the description to this?? Sorry for being obtuse, I'm tired. Thanks...
<meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
This is modifying the SMF core code rather than TP, but will try to help just the same.
The 'content' field is being supplied the page's name; if you want to add text to it, try this (using your provided code):
<meta name="description" content="', $context['page_title'] . ' : your new text goes here' , '" />', empty($context['robot_no_index']) ? '' : '
I put a colon in the string to set it off from the page title... but you can change it to your liking.
This should be part of a bigger echo statement, but should drop right back in where you got it. I can only emphasize to make backups beforehand.
Basically what I'm trying to do is add the meta tag description. Below is how I would do it on a regular html website.
<meta name="description" content="my site description text here">
Look through the code for the "new text" section; that should do what you want.