We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I grab the page title if...

How Do I?

kimmiekins's avatar
kimmiekins
2 posts
7 years ago
kimmiekins's avatar kimmiekins

I’m trying to set up my site so that the title meta tag shows one of two things…

The entry title, if it’s a channel. The page name, if it’s a page in the Pages module.

I’m wracking my brain, but I’ve been on an EE hiatus for years, so it’s all new (again) to me.

Thanks!

       
Paul Bailey's avatar
Paul Bailey
63 posts
7 years ago
Paul Bailey's avatar Paul Bailey

I might be missing something here. Whether you’re using a plain channel entry or an entry with a URL defined using the Pages module, the entry title/page name should just be:

{title}

If you want the path to the entry/page, which will be different, something like this should work:

{if page_url} {page_url} {if:else} {auto_path} {/if}

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.