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.

Recommended Way to Manage META Tags

August 17, 2011 1:31pm

Subscribe [3]
  • #1 / Aug 17, 2011 1:31pm

    amityweb

    162 posts

    Hi

    Hope you don’t mind me asking, another issue I cannot find a solution for online…

    In order to control META tags on a per page basis I have installed SEO Lite. This works OK for channel entry pages, it adds an extra Tab to channel content.

    BUT index pages wont have a channel entry. So I have a Blog, Testimonials, Portfolio and a few more index pages that show listings from the channels.

    How would an EE expert add these fields?

    Couple of things to note:

    1) I want all content in the editor and not hard coded. Customers will employ a SEO guy to login and add META data. Seems a lot of META tutorials hard code content.

    2) I do not allow customers to edit templates so they can’t see snippets or global variables.

    The only way I can think of is create a new Channel called META Data which includes a field to add the url_title and add in the index page META to there, then check segment_1 URL and call the correct data depending on the url_title.

    Thanks a lot

  • #2 / Aug 17, 2011 4:46pm

    Rob Allen

    3114 posts

    There are several ways including:

    1. For categories you can use custom category fields
    2. You could utilise a “meta” Channel as you mentioned, and use relationships/categories/statuses to output content
    3. You could use the excellent http://gotolow.com/addons/low-variables addon

    Personally I haven’t used meta descriptions/keywords for years, I get better results by letting search engines use content from the page 😊

  • #3 / Aug 17, 2011 5:10pm

    amityweb

    162 posts

    Thanks…

    1) I’ve not used categories yet, still learning, not sure if I need to use them
    2) I think I will try this, seems the easiest so far, but not too familiar with relationships yet, will have to look into that
    3) am trying to not use commercial plugins. There are so many things I need to do that have a commercial plugin, if I purchased all of them the total project cost is too high. So I try to find ways of doing them in the cms as you’d expect.

    Will report back my way if I find a good solution.

    Thanks

  • #4 / Aug 17, 2011 10:50pm

    Dan Decker

    7338 posts

    amityweb,

    Let us know what you find that works for you. Don’t be shy of add-ons, they are part of ExpressionEngine’s power and flexibility. Think if you bought a computer but never installed any apps? There are several available at low-to-no-cost that could help you achieve the results you are looking for.

    However, my opinion, the Channel route would be the easiest to implement. I’m going to move this into Community Help to keep the discussion going. I’ll stay subscribed to the thread incase you need any further input from us.

    Cheers!

  • #5 / Aug 18, 2011 6:58am

    amityweb

    162 posts

    Hi Dan. Thanks, just want to clarify I am not shy of add-ons, just the commercial ones. I have already agreed the project cost. There are many that would be good which would add up to cost more then EE itself. I disagree that commercial add-ons are required to add functionality that I consider should be part of a CMS core (Wysiwyg, Menu Manager, META manager to name a few). These should be considered fundamental in a CMS because the CMS user will not be technical and will not be able to edit templates or HTML in channels. So I do not think these specific commercial add-ons should be the norm but need to be integrated into EE core.

    Instead we have to find ways of using the system as it is in order to implement a fundamental CMS or website requirement, which may not be the best way.

    Now I know these costs, when I cost the next projects I may consider them as optional extras, but then it means the total project cost just takes it up above a competitive price that means I may not get the job. Customers start to ask why use EE for an extra £300 say, when Joomla/Drupal/Wordpress is free. If it saved £300 then they will go for those. At extra £189 for EE itself is OK, and that is worth it and I want to use it, because the development and Admin CMS is easier… but as costs increase for fundamental CMS functionality, you start to question the cost savings over benefits.

    Just want to finish by emphasising I do like EE and want to use it, and will suggest it to customers, but ultimately the choice is up to them from a cost perspective. If a competitor of mine is £300 less with a Joomla site, the customer is likely to choose them as they dont know anything about Joomla/EE/WP etc. They just want a website with CMS with the feature missing in EE. I would likely use EE a lot more if it had a Wysiwyg editor, Menu Manager and META management. I would use EE for any general site. At the moment I am only using EE for a data driven website that requires custom fields, like database websites because its quicker to create the functionality than develop a specific Joomla component.

    I’ve taken my thread off track now sorry! I will still report back on what I have done with META management for the benefit of others.

  • #6 / Sep 24, 2011 6:23am

    amityweb

    162 posts

    I think I may have found a simple solution…

    Instead of creating a new channel just for META tag management of index pages, or hard coding, or adding commercial add-ons, I already have a channel called Pages, for things like About Us, Contact Us etc. which use the SEO Lite module to manage META data for those pages.

    So all I have done is create a Page for my index pages, so Blog, News, etc. then use the SEO Lite tab to add in the META data for those as if they are channel entries.

    Then using the following SEO Lite code it shows the correct META data on the channel listing page that otherwise would not have entries:

    {if segment_2 != ''}
    {exp:seo_lite use_last_segment="yes" friendly_segments'"y" default_title='{segment_2}’ default_keywords=’’ default_description=’’ }
    {/if}
    {if segment_1 != '' && segment_2 == ''}
    {exp:seo_lite use_last_segment="yes" friendly_segments'"y" default_title='{segment_1}’ default_keywords=’’ default_description=’’ }
    {/if}
    {if segment_1 == '' && segment_2 == ''}
    {exp:seo_lite url_title='home' default_keywords='' default_description='' }
    {/if}


    So SEO Lite will show the META entered for each Page, and if no META data is entered it takes the {segment_1} or {segment_2}, and if both those are missing (so home page) will use the url_title to get the META info for home, showing Site Name if this is not entered.

    A bonus of this is we can use these pages to actually add some text perhaps an intro above the News listing on the /news page itself.

    Notice my default_keywords and default_description are blank… I don’t want default ones because then unless I add them for all pages, I will have duplicate ones across multiple pages which is not good for SEO. Keywords are not used anymore, and if a description is blank Google will take it from the content.

    The only issue I can see so far is when going to http://www.mydomain.co.uk/site/news it shows the content on its own because it thinks its a channel entry, but we don’t use this URL we use http://www.mydomain.co.uk/news . To get around this I could always put the news in my site template instead of its own, OR do a redirect to the /news if /site/news is entered.

  • #7 / Sep 24, 2011 7:23am

    amityweb

    162 posts

    Here’s my latest SEO Lite META code to take into account Pagination and a Custom Title from channel entries (e.g. a Job details to include location, salary etc.), and some PHP to turn segments into capitalised:

    {!-- PHP to determine if its a paginated page, and get the paginated number --}
    <?
    $entry = "{segment_2}";
    $list = false;
    if (preg_match("#^P(\d+)|/P(\d+)#",$entry,$matches) ) 
    { 
     $list = true;
     $count = $matches[1];
    }
    ?>
    
    {!-- If its a paginated page, use SEO Lite title_override as Site Name, Segment 1 and Pagination Number --}
    
    <?php if($list) : ?>
    {exp:seo_lite use_last_segment="yes" friendly_segments'"y" title_override="{site_name} <?php echo ucwords("{segment_1}");?> List #<?php echo $count;?>" default_keywords='' default_description='' }
    <?php endif; ?>
    
    {!-- If its a not paginated page, and not a page with custom titles (i.e. Jobs), use the SEO Lite entries --}
    
    <?php if(!$list) : ?>
    {if segment_2 != '' && segment_1 != 'jobs'}
    {exp:seo_lite use_last_segment="yes" friendly_segments'"y" default_title='<?php echo ucwords("{segment_2}");?>' default_keywords='' default_description='' }
    {/if}
    {if segment_1 != '' &&  segment_2 == ''}
    {exp:seo_lite use_last_segment="yes" friendly_segments'"y" default_title='<?php echo ucwords("{segment_1}");?>' default_keywords='' default_description='' }
    {/if}
    {if segment_1 == '' &&  segment_2 == ''}
    {exp:seo_lite url_title='home' default_keywords='' default_description='' }
    {/if}
    <?php endif; ?>
    
    {!-- Custom Redirects & Titles (i.e. Jobs) --}
    
    {if segment_1 == 'jobs' && segment_2 != ''}
    {exp:channel:entries channel="jobs" url_title="{segment_2}"}
    {exp:seo_lite default_title='<?php echo ucwords("Vacany: {title} in {job_location} | Salary {job_salary} | {job_type}");?>' default_keywords='' default_description='' }
    {/exp:channel:entries}  
    {/if}

    Website with in action if interested, but not finished the META tags yet! http://www.focusedrecruitment.co.uk/

    I think the next step would be to show the custom titles for the jobs only if a SEO Lite META entry has not been entered (so to override the custom one with SEO Lite) but not done that yet, probably leave it as it is unless the customer wants to override the jobs meta.

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

ExpressionEngine News!

#eecms, #events, #releases