ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Adding a page title to a template without embedding anything

November 08, 2011 12:18pm

Subscribe [5]
  • #1 / Nov 08, 2011 12:18pm

    EnergyFreak

    102 posts

    Hi,

    I want to add page titles, meta descriptions and meta keywords to my templates. How can I achieve this without having to use the {embed} tag. I do not want to embed anything, I just want to add a title and the rest to every page.

    Thanks.

    Moved to Community Help forum by Moderator

  • #2 / Nov 08, 2011 12:50pm

    mz91184

    100 posts

    I am not sure if this is the correct or best answer, but I have been really enjoying it.

    Check out using template partials (http://johndwells.com/blog/homegrown-plugin-to-create-template-partials-for-expressionengine).  If you do it correctly you can use one embed for each template.  A great article to help follow DRY in EE.

  • #3 / Nov 08, 2011 3:27pm

    EnergyFreak

    102 posts

    Okay I will take a look at it.

  • #4 / Nov 09, 2011 1:35am

    John Henry Donovan

    12339 posts

    Hi EnergyFreak,

    Take a look at this article from Lisa which will give you the basics

    EE blog : SEO: Meta Tags

    There is also an addon which I use my self called SEO lite which does it well

    Let us know if that helps

  • #5 / Nov 09, 2011 12:42pm

    EnergyFreak

    102 posts

    Hi John,

    This looks like my best option for now. I just have a question on the usage of it. If you don’t mind answering them?

    1. I am creating dummy pages (entries) to be able to add some seo to my pages (titles, desc, keywords) and not publishing them. Afterwards I am taking their id and using {exp:seo_lite entry_id='1'} to add it to the template I want. Is this a good way of doing it? Or do you recommend something better?

    2. If a user creates an entry from SAEF, how would SEO Lite function?

    Thanks for your help.

  • #6 / Nov 09, 2011 1:08pm

    Sue Crocker

    26054 posts

    Hi, EnergyFreak. Questions regarding 3rd party add-ons should normally be directed to the author of the add-on,  or in this case, the Community Help forum. Moving there for additional community support.

  • #7 / Nov 09, 2011 2:35pm

    Rob Allen

    3114 posts

    There’s no reason why you can’t add a relevent channel entries tag to your template(s) as well, eg:

    {exp:channel:entries channel="channel_name" limit="1" disable="categories|member_data|pagination"}
    <title>{title} - {site_name}</title>
    <meta name="description" content="{my_custom_field}" />
    {/exp:channel:entries}

     

  • #8 / Nov 09, 2011 2:39pm

    EnergyFreak

    102 posts

    I think I understand how to use SEO Lite now, thanks for the tip though.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases