Aug 08, 2008, 01:57 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
modxcms.com web
  MODxCMS.com   Forums   Help Login Register  
News:Donate to MODx: Donations
Pages: [1] 2   Go Down
  Print  
Author Topic: [Tutorial] Google Sitemap with Ditto  (Read 11768 times)
0 Members and 1 Guest are viewing this topic.
neon_eddy
Full Member
***
Posts: 150


I like Turtles


WWW
« on: Apr 02, 2007, 04:07 PM »

http://webbake.com/tutorials/modx-cms/google-sitemap-with-ditto

Here ya go.  I need to get commenting and such on the site, but well see.
Logged

~Shawn Himmelberger
Check out my Minneapolis MODx Web Design Company - Himmelberger Design | Also visit my friend's Minneapolis Computer Repair company -  Alt Repair
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #1 on: Apr 02, 2007, 04:15 PM »

Excellent tutorial! Please note that if you are using Ditto 2 you don't need the tv prefix and descendentDepth is simply depth.
Logged

neon_eddy
Full Member
***
Posts: 150


I like Turtles


WWW
« Reply #2 on: Apr 02, 2007, 04:21 PM »

Edit made :-)
Logged

~Shawn Himmelberger
Check out my Minneapolis MODx Web Design Company - Himmelberger Design | Also visit my friend's Minneapolis Computer Repair company -  Alt Repair
milicicd
Member
**
Posts: 59



« Reply #3 on: Apr 05, 2007, 03:50 AM »

Do we have your permission to put this tutorial on wiki? Thanx in advance!
Logged
lukwe
Full Member
***
Posts: 172



WWW
« Reply #4 on: Apr 05, 2007, 12:51 PM »


Hi, I tried this Ditto approach after not succeeding with the [[Sitemap]] snippet.

Interestingly I am getting exactly the same errors!

see http://modxcms.com/forums/index.php/topic,5754.0.html
Logged

----------------------------------------------------------
http://www.linkedin.com/in/lucapost
----------------------------------------------------------
davidm
Marketing & Design Team
*
Posts: 6,526


The best way to predict the future is to invent it


WWW
« Reply #5 on: Apr 05, 2007, 12:53 PM »

Woot great stuff neon-eddy, a great testimony to Ditto's versatility Grin
Sure belongs in the wiki !
Logged

blog.nodeo.net : Pour un web libre, moderne et ouvert! :: | ! Nouveau ! Les forums modxcms.fr : Participez à l'élaboration du site MODx francophone ! ! Nouveau ! :.

MODx est l'outil idéal pour les developpeurs et webdesigners qui cherchent un framework de gestion de contenu hautement flexible et performant, tout en étant simple d'accès pour les utilisateurs finaux.

Config : Apache 2.2.8 - MySQL 5.0.45 - PHP 5.2.5 | Debian 4.0 (Etch)

Réalisations sous MODx : nodeo.net | gican.asso.fr | michelez-notaires.com | amadom.gerondicap.com | sworld.com | soleil.info
 et 3 autres en cours de réalisation Smiley
Mark
Moderator
*
Posts: 3,247


Ditto Developer


WWW
« Reply #6 on: Apr 05, 2007, 01:36 PM »

@lukwe: Try it without setting the page to be xml.
Logged

lukwe
Full Member
***
Posts: 172



WWW
« Reply #7 on: Apr 06, 2007, 05:20 AM »

Quote
@lukwe: Try it without setting the page to be xml.

That's how I get to see the error:
PHP error debug
  Error:    explode() [function.explode]: Empty delimiter.   
  Error type/ Nr.:    Warning - 2   
  File:    /user0/htdocs/modx/manager/includes/document.parser.class.inc.php(724) : eval()'d code   
  Line:    195


If I leave it as xml I only get a blank/empty page.

If I make the same Ditto call from a regular HTML page with template and no

<?xml version="1.0" encoding="UTF-8"?>.. stuff, I do get the output.

The Ditto call is: [[Ditto?parents=`15,258`&tpl=`DittoSitemap`&dateSource=`editedon`&display=`all`&sortBy=`createdon`&depth=`4`&showInMenuOnly=`1`]]

the DittoSitemap chunk is:
<url>     
<loc>[(site_url)][~[+id+]~]</loc>     
<lastmod>[+date+]</lastmod>     
<priority>[+priority+]</priority>
</url>

Logged

----------------------------------------------------------
http://www.linkedin.com/in/lucapost
----------------------------------------------------------
neon_eddy
Full Member
***
Posts: 150


I like Turtles


WWW
« Reply #8 on: Apr 12, 2007, 02:52 PM »

I plan on writing more good works, and for future things, yes, you have my permission for this and all tutorials, maybe just give me a link to my company / project site http://wavestatic.com / http://webbake.com respectively

To those getting goofy errors make sure your priority template variable looks like this. (attached image)

for debugging purposes I would set the doctype to be html, once is spits out good xml, then switch it.



* Picture_2.png (8.63 KB, 353x250 - viewed 595 times.)
« Last Edit: Apr 12, 2007, 02:54 PM by neon_eddy » Logged

~Shawn Himmelberger
Check out my Minneapolis MODx Web Design Company - Himmelberger Design | Also visit my friend's Minneapolis Computer Repair company -  Alt Repair
lukwe
Full Member
***
Posts: 172



WWW
« Reply #9 on: Apr 12, 2007, 06:48 PM »


I finally got it right; when I pasted from your tutorial I added a closing tag for XML, which is actually not in the sitemap schema.

I also had to put a '&dateFormat=`%Y-%m-%d`' in the Ditto call, 'cause the Google Sitemap checker was complaining...

Logged

----------------------------------------------------------
http://www.linkedin.com/in/lucapost
----------------------------------------------------------
neon_eddy
Full Member
***
Posts: 150


I like Turtles


WWW
« Reply #10 on: Apr 13, 2007, 09:45 AM »

I'm glad you got it working.

https://www.google.com/webmasters/tools/docs/en/protocol.html   this is the spec from google, no closing xml tag .. so I'm lost on that one.

also.. did my date format not work correctly?
Logged

~Shawn Himmelberger
Check out my Minneapolis MODx Web Design Company - Himmelberger Design | Also visit my friend's Minneapolis Computer Repair company -  Alt Repair
lukwe
Full Member
***
Posts: 172



WWW
« Reply #11 on: Apr 16, 2007, 05:40 AM »



&dateFormat=`%Y-%m-%d` should be good, I probably pasted in something different from other Ditto Calls during my attempts

Logged

----------------------------------------------------------
http://www.linkedin.com/in/lucapost
----------------------------------------------------------
frippz
Jr. Member
*
Posts: 38



WWW
« Reply #12 on: Aug 14, 2007, 10:12 AM »

Really great stuff! Now, can some genious create a function to predict the value for the changefreq tag?  Grin
Logged

"In the beginning the universe was created. This made a lot of people very angry and is widely considered as a bad move."
neon_eddy
Full Member
***
Posts: 150


I like Turtles


WWW
« Reply #13 on: Aug 14, 2007, 11:09 AM »

explain this change frequency thing?  I'm sure we can make it work.
Logged

~Shawn Himmelberger
Check out my Minneapolis MODx Web Design Company - Himmelberger Design | Also visit my friend's Minneapolis Computer Repair company -  Alt Repair
frippz
Jr. Member
*
Posts: 38



WWW
« Reply #14 on: Aug 14, 2007, 11:22 AM »

https://www.google.com/webmasters/tools/docs/en/protocol.html#xmlTagDefinitions

It's an optional tag, so it may not be very important to implement. I just thought it would be cool if someone was able to do it. Smiley
Logged

"In the beginning the universe was created. This made a lot of people very angry and is widely considered as a bad move."
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP

Copyright © 2005-2008 MODxCMS, All rights reserved. Contact Us
Styles by ziworks.com

Powered by SMF 1.1.4 | SMF © 2005, Simple Machines LLC

Valid XHTML 1.0! Valid CSS!