I’m using the following code as my meta template inside an embed header template…
This works for my blog posts, but for pages that don’t have a segment_3, it doesn’t work… ie. url.com/contact
Is there an easy way to either override a few pages with a fixed title, or use segment_2 for pages that don’t have segment_3?
{exp:lg_better_meta_pi:template
entry_id="{embed:entry_id}"
weblog_id="{embed:weblog_id}"
url_title="{segment_3}"
title="{embed:title}"
title_suffix="{embed:title_suffix}"
title_prefix="{embed:title_prefix}"
hide_site_title="{embed:hide_site_title}"
description="{embed:description}"
keywords="{embed:keywords}"
author="{embed:author}"
publisher="{embed:publisher}"
rights="{embed:rights}"
date_created="{embed:date_created}"
date_modified="{embed:date_modified}"
date_valid="{embed:date_valid}"
identifier="{embed:identifier}"
robots_index="{embed:robots_index}"
robots_follow="{embed:robots_follow}"
robots_archive="{embed:robots_archive}"
}
Thanks!
I always add the {exp:lg_better_meta_pi:template} code to an embeded head element.
Then in individual templates you can add:
{embed="_includes/.head" url_title="{segement_3}"} or
{embed="_includes/.head" url_title="{segement_2}"} or
{embed="_includes/.head" entry_id="{segement_3}"} or
{embed="_includes/.head" title="About Us | Contact"}
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.