meta description tweak

onelife69

Member
Hi all,

I'm looking to include the post title text into the meta description tag, just before the text xf normally grabs for the description. Can anyone tell what code I would need to put in to do this in page_container?

For example:

post title: bag of widgets
post text: a post that should contain the title string but instead waffles on about something else
current meta desc: a post that should contain the title string but instead waffles on about something else

required tweak meta desc:bag of widgets a post that should contain the title string but instead waffles on about something else

Any help would be gratefully appreciated
 
Would something like this work where I've added in the xen:raw $title - apologies I don't understand code.

Code:
<xen:if is="{$pageDescription.content} AND !{$pageDescription.skipmeta} AND !{$head.description}"><meta name="description" content="{xen:raw $title, xen:string wordTrim, {xen:helper stripHtml, {xen:raw $pageDescription.content}}, 150}" /></xen:if>
 
Top Bottom