Module

Developer
Supported

Sitemap Module

ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From PutYourLightsOn

     

You must be logged in to post.

Implementation advice sought

Support (Resolved)

Rick Lecoat
Rick Lecoat

Ben, I love the simplicity of this add-on, thanks. I have a question regarding implementation. This site has several channels which, rather than creating entries each with their own page, instead create multiple subsections of a single page. So, for instance, the Services channel has multiple entries each of which are presented as a subsection of the Services page; each entry’s URL is thus www.domain.com/services#{url_title}. The About page works the same way except that it combines entries from three different channels.

When I am setting the preferences for the Services channel in Sitemap, should I set it so that each entry is listed separately (ie. URL = www.domain.com/services#{url_title}, or should I simply leave off the URL fragment and set the Services URL to www.domain.com/services ?

My uncertainty stems from the fact that both ways would list the same page multiple times, albeit that the former way has various URL fragments to differentiate the entries. I’m not sure if XML sitemaps allow such an approach.

Any advice?
Thanks.

PutYourLightsOn
# 1
Developer
PutYourLightsOn

in this case, my advice would be to exclude the Services channel from the sitemap and to manually add the url to your services page as a location. make sense?

Rick Lecoat
# 2
Rick Lecoat

Thanks for the advice Ben. Yes, that makes sense, I think. So I am, effectively, ignoring the fact that EE contains a ‘Services’ channel with multiple entries, and pretending (from Sitemap’s point of view) that Services is a static page. Right?

Rick Lecoat
# 3
Rick Lecoat

Okay, I’ve done that and it makes sense. In fact nearly all the site is built the same way as the Services section, so nearly every page is entered as a ‘location’. The exception is the News section, which functions in a more traditional blog-like manner. I can see that the individual news articles are given their own URLs in the map, which is fine, and I assume that the News index page (the main listing of articles) should be entered as a ‘location’(?) but what is the approach to take for the archive pages? I have two types of archive pages: monthly (www.domain.com/news/month/yyyy/mm) and yearly (www.domain.com/news/year/yyyy) (where ‘yyyy’ and ‘mm’ denote the dynamically generated year and month segments respectively). Additional URLs are created as and when articles in the database meet the archive date criteria, so how does site map deal with these pages? If I add them as locations then the client will have to remember to add extra locations as new archive URLs are created (monthly and yearly). That’s both an annoyance for the client, and it also means that I have to give them access to the Sitemap module, something that I would prefer to leave locked off from tinker-happy client fingers. Am I missing something obvious here?

PutYourLightsOn
# 4
Developer
PutYourLightsOn

if you consider that the purpose of the sitemap is to help search engines discover your site content, then including your main pages as locations, as well as your individual news articles by including the channel, is going to cover the majority of your site. the news archive pages are simply listing pages (and i assume subsets of the main news listing page) that link to individual news articles which are anyway included in the sitemap, so i would say that it is totally fine to simply leave them out of the sitemap.

Rick Lecoat
# 5
Rick Lecoat

Hi Ben. Yes, I suppose you’re right. I was going down the thought process of “the site map should show every URL on the site (other than things like search results) and the archives are specific URLs—I mean, you could type the URL in and go to that page—so I should include them” but what you say does make sense. I’ll follow your advice. Cheers.

PutYourLightsOn
# 6
Developer
PutYourLightsOn

ok great