Sitemap:
To view a sitemap file (sitemap.xml) that Google uses to navigate and index the pages of your site, you must install the snippet
Sitemap
programmed Grad. install instructions available on the wiki,
apart from being English, are incomplete, especially for a badger like me. Here is how it must proceed: 1 - download the text provided to the sitemap page. While writing this article, we are at version
sitemap_1.0.6.txt
2 - In the MODx manager, go Resources> Management Resources>
snippets. Click the new snippet and give him the name SiteMap
respecting property capitalization, no spaces, and anything I wrote as well. 3 - Flip open the file
sitemap_1.0.6.txt
previously downloaded, Select All (Ctrl + A) and copy, then return to MODx and paste this text into the new snippet, having previously careful to delete any content that MODx snippet assigns default (these are characters that are already contained in the text file. Do not bother to put them 2 times). 4 - Check the box Start executing the snippet after the recording and click Save.
5 - Always tab
Resources Management, go to the tab Management Templates and click New Model . Name the new model SitemapGoogle
and leave the empty (no content) and then save. 6 - appointment later in the document tree. Create a new document that you call
sitemap
, especially specify the alias of the document: sitemap.xml
In Model used, choose the template SitemapGoogle
you just created. Uncheck display the menu.
Then click the Setup tab of the page and uncheck the boxes Wysiwyg Editor, Save the visits, to be placed in cache and
Remove the cache. Finally, in the dropdown menu content type, specify Text / XML, and then made
record. 7 - Edit the document you just created, and make sure that the contents of the document does not display a WYSIWYG editor such TinyMCE that: the code does not bear the tags added by this module. In the body of the document, insert this:
[! SiteMap? & Format = `sp`!]
Save and publish the document. 8 - You've done everything as it should? Hébin home that does not work. I tried everything and nothing to do. The document should be accessible from http://www.votresite.com/sitemap.xml, but to no avail. It does not even work if you type in the address bar of the document number, for example (if it is number 75): http://www.votresite.com/index.php?id=75.
At home, I get a display like this:
XML Parsing Error: no element found
Location: http://www.votresite.com/index.php?id=75
Line Number 1, Column 1: ^
9 - but as a genuine badger does not hurt the arm, here's the solution I found by searching on the forums MODx: return to step 7 and delete the contents of the document. Or rather, cut it: we will put it elsewhere. Whatever the document sitemap must be empty.
10 - Go into the template
SitemapGoogle
and edit it. Paste the code fragment
[! SiteMap? & Format = `sp`!] and save.
11 - return address on your doc, for example
http://www.votresite.com/index.php?id=75. It works! Okay this is not nickel, but the goal is to tell Google (via the webmaster tools ) or is the sitemap of your site, it sufit to give him the URL and turn will be played. And hop. Then by cons, you say why this is so I do not know. If a player has a nice idea ... By cons, address http://www.votresite.com/sitemap.xml still does not work. I like an idea that I'll have to look at the stories of aliases. I tried removing the extension. Xml the alias, but nothing changes. So I started some time later on another site. Nothing beats ripen a bit sometimes. And it worked!
Here is the technical
- I created a snippet called SiteMap where I code the content dufichier
sitemap_1.0.6.txt
mentioned in step 3 above. I do not check the box "start execution of the content after registering.
- I created a template called SitemapGoogle whose content states: [! Sitema & # 112;? & format = `s p `!]
-I create a document with the title and alias sitemap sitemap.xml. Attention should be well after rajouter.xml sitemap! This document uses the template SitemapGoogle. I publish it and then I edit it and I go into the settings page, or I do not let that ticked the boxes "searchable" and "delete cache". I choose a content type text / xml in the dropdown menu, and nothing else.
Note that the site in question uses the setting Configuration> Tools> Settings URL simple> checkbox ticked yes for the option "Use simple URLs.
And voila.