8

I wouldn't mind showing my XML sitemap to users if there were a way to make it human usable as opposed to just machine readable. Is it possible to:

  • Choose the colors and layout
  • Make the locations into links
  • Allow sorting based on the field (location, last modified, etc)

I was thinking that XSLT might be a possibility, but I haven't explored it. If it is possible, please provide a minimal example.

Stephen Ostermiller
  • 99,822
  • 18
  • 143
  • 364

2 Answers2

9

Yes. Everything you ask for is possible. And here's an example XML sitemap file generated by the Drupal XML sitemap module with a little bit of configuration. Everything is done for you out of the box.

http://softkube.com/sitemap.xml

If you check the code of the XML file there's a link to an XSL and inside that file you can see the code with references to JS and CSS files and more or less similar to an HTML file.

The above you get almost free (with little config that is) with Drupal and its XML sitemap module. Now check this:

http://softkube.com/sitemap

This is custom made code we wrote to automatically display all the pages (blog posts, portfolio items, etc) in a user friendly sitemap format. I'm not aware of an automated way to go about this as this tends to be site specific. In my opinion, this is more user friendly and also keeps the website's navigation and footer and everything.

Hope this helps and good luck.

Mario Awad
  • 441
  • 2
  • 8
2

Of course. XML is just XML and can be served as XHTML by using XSL if you wish and styled with CSS.

Rob
  • 4,619
  • 2
  • 22
  • 25