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.

Does Pages Module work with Hidden Templates? Want to avoid double indexing. Tech Support help?

December 12, 2011 5:56pm

Subscribe [2]
  • #1 / Dec 12, 2011 5:56pm

    bgarrant

    356 posts

    This question may be related to a resolved thread.

    Has this issue been corrected or are hidden templates still causing issues with Pages module?  See: http://ellislab.com/forums/viewthread/204426/. I have a site I am about to update that has about 100 entries and want to be sure first.  Since they use Pages module in EE, we typically have made the templates hidden in the past to avoid double SEO entries. See this method that we have used in past: http://www.fatfreeinteractive.com/blog/post-title/expression-engine-pages-module-tutorial.

    Bryan

  • #2 / Dec 13, 2011 11:39am

    bgarrant

    356 posts

    Can anyone provide feedback on this?  I have a site in EE 2.1.0 that we use the Pages module on that we want to update to version 2.3.1.  We do not want the templates to be indexed by the search engines.  Can we continue to use hidden templates, or is there a better way to keep search engines from “double” indexing the site?  This is what I am trying to do:

    http://domain.com/friction  - with custom URL vie Pages module, we want this one indexed

    http://domain.com/page/_one-column-with-header/friction  - without custom URL it will display template_group/template_name/entry format which does not look as nice.  We want these to be indexed by search engines.  This is why we wanted to hide the templates.

    What is best way to do this if hidden templates are not possible with the Pages module?  Should we just exclude template_groups and templates using a robots.txt?

    User-agent: *
    Disallow: /template_group/
    Disallow: /template_group2/template_name

    Trying to use the EE preferred method for this.

  • #3 / Dec 13, 2011 12:11pm

    bgarrant

    356 posts

    I am reading mixed answers on this issue.  This post says it is not possible http://ellislab.com/forums/viewthread/204151/.  But when I test it looks like it may work?  I setup a entry called “friction” with the Pages module linked to a hidden template (_one-column-with-header) as follows:

    http://domain.com/friction

    I think it is working but why does it say in other posts that it does now work?  Does it just not work with the period (”.”) but still work when choosing a template with an underscore (“_”)?  I think we all need some clarification from the EE team on this one.

    Thanks, Bryan

  • #4 / Dec 13, 2011 12:55pm

    bgarrant

    356 posts

    Is it just the underscore in the template_group that causes issues with pages module?  Please see my questions above in previous posts.

  • #5 / Dec 13, 2011 3:51pm

    bgarrant

    356 posts

    Can anyone in tech support provide some clarification? I hate to bump, but I need to get working on this site today if possible.

  • #6 / Dec 13, 2011 6:16pm

    bgarrant

    356 posts

    Has anyone from tech suppport had a chance to look at this post?  I really need to get this site upgraded to 2.3.1 ASAP as we need the new file manager functions.  Any help is greatly appreciated.

  • #7 / Dec 13, 2011 9:33pm

    John Henry Donovan

    12339 posts

    Hi bgarrant,

    As confirmed by Sean here Seb’s assumptions are all correct.

    What I would suggest is this. Create a local copy of your current site and perform an upgrade there first.
    If all goes swimmingly then move that site to the live host.

    I wouldn’t rely fully on hidden templates for the SEO purpose of omitting duplicate entries.

    remember you also have A Google site map, robots.txt file the required_entry= parameter and Strict URLs

    I hope that helps

  • #8 / Dec 13, 2011 9:43pm

    bgarrant

    356 posts

    I actually thought that was what hidden templates did. So a template with a name like _templatename will not work with Pages module? The post referenced only talks about the format .templatename with a period.

    So I should exclude template groups in robots.txt and provide a google site map? I use the require_entry=yes parameter in templates, but I want to make sure the search engines don’t index the full URL and only index the Pages module URL. Is there any other way to ensure those template_group/template/entry URLs are not included?

  • #9 / Dec 13, 2011 9:55pm

    bgarrant

    356 posts

    Hi bgarrant,

    As confirmed by Sean here Seb’s assumptions are all correct.

    What I would suggest is this. Create a local copy of your current site and perform an upgrade there first.
    If all goes swimmingly then move that site to the live host.

    I wouldn’t rely fully on hidden templates for the SEO purpose of omitting duplicate entries.

    remember you also have A Google site map, robots.txt file the required_entry= parameter and Strict URLs

    I hope that helps

    The site I am upgrading uses the pages module with templates using an underscore prefix. Those will not work correct?

  • #10 / Dec 19, 2011 3:10pm

    Kevin Smith

    4784 posts

    The site I am upgrading uses the pages module with templates using an underscore prefix. Those will not work correct?

    That’s correct; hidden templates are incompatible with Pages.

    I would recommend turning on Strict URLs, like John Henry suggested, and making use of a conditional like this in your template to keep your Pages content from being accessed using the standard template URL structure:

    {if segment_1 == 'template_group'}   {redirect="404"} {/if}
  • #11 / Dec 19, 2011 3:19pm

    bgarrant

    356 posts

    I never thought of that approach Kevin.  I setup a disallow: /index.php/ and disallow: /pages/ in robots.txt as well.  Since pages is the template_group name, will that help? Thanks.

  • #12 / Dec 19, 2011 3:27pm

    bgarrant

    356 posts

    The site I am upgrading uses the pages module with templates using an underscore prefix. Those will not work correct?

    That’s correct; hidden templates are incompatible with Pages.

    I would recommend turning on Strict URLs, like John Henry suggested, and making use of a conditional like this in your template to keep your Pages content from being accessed using the standard template URL structure:

    {if segment_1 == 'template_group'}   {redirect="404"} {/if}

    Since I do not want anything added to the URL after segment 1, I turned on Strict URLs as well.  The template group is called “pages” and I do not want it accessible via a URL as I am using the pages module. I also want to redirect to the 404 is no entries.  Does this look correct or should I combine conditionals somehow?

    {if segment_1 =='pages'} {redirect="404"} {/if}
    {if segment_2!=""} {redirect="404"} {/if}
    <div class="clearfix" id="maincontainer">
    {exp:channel:entries channel="pages" disable="categories|member_data|pagination" require_entry="yes" limit="1"}
    {if no_results} {redirect="404"} {/if}
     my data will be here
    {/exp:channel:entries}
  • #13 / Dec 19, 2011 4:33pm

    bgarrant

    356 posts

    The site I am upgrading uses the pages module with templates using an underscore prefix. Those will not work correct?

    That’s correct; hidden templates are incompatible with Pages.

    I would recommend turning on Strict URLs, like John Henry suggested, and making use of a conditional like this in your template to keep your Pages content from being accessed using the standard template URL structure:

    {if segment_1 == 'template_group'}   {redirect="404"} {/if}

    Sine the client will have control of the site soon and will be using the pages module. do you think I should worry about this piece of code on pages they will be able to create?

    {if segment_2!=""} {redirect="404"} {/if}

    This will be great as it would stop anyone from adding anything to the URL, but is it even needed if I use the Strict URLs and 404 redirect with require_entry parameter?

  • #14 / Dec 19, 2011 4:55pm

    bgarrant

    356 posts

    The site I am upgrading uses the pages module with templates using an underscore prefix. Those will not work correct?

    That’s correct; hidden templates are incompatible with Pages.

    I would recommend turning on Strict URLs, like John Henry suggested, and making use of a conditional like this in your template to keep your Pages content from being accessed using the standard template URL structure:

    {if segment_1 == 'template_group'}   {redirect="404"} {/if}

    I see no advantage to having the line.

    {if segment_2!=""} {redirect="404"} {/if}

    It seems to work the same without it.  Is there any advantage to leaving in the line?  Without it I can allow client to add any URLs they want in Pages Module.  With it they can only add one segment.

    {if segment_1 =='pages'} {redirect="404"} {/if}
    //{if segment_2!=""} {redirect="404"} {/if}
    <div class="clearfix" id="maincontainer">
    {exp:channel:entries channel="pages" disable="categories|member_data|pagination" require_entry="yes" limit="1"}
    {if no_results} {redirect="404"} {/if}
     my data will be here
    {/exp:channel:entries}
  • #15 / Dec 19, 2011 5:06pm

    bgarrant

    356 posts

    Here is final post I hope.  Please let me know what you think.  I want to exclude the “pages” template_group from being indexed since we are using the pages module for these.  I also want to make sure no additional URL segments are added to the entries.  Will this cover just about all scenarios since I have the Strict URLs enables and 404 redirects?

    {if segment_1 =='pages'} {redirect="404"} {/if}
    {exp:channel:entries channel="pages" disable="categories|member_data|pagination" require_entry="yes" limit="1"}
    {if no_results} {redirect="404"} {/if}
     my data will be here
    {/exp:channel:entries}

    I want the client to be able to create any URL they want for the pages, so do I need the

    {if segment_2!=""} {redirect="404"} {/if}
.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases