>>> I've tried exposing the file in my controller and putting the file in
>>> the /templates directory but this doesn't seem to work (seems that a
>>> period in the filename is not supported in the expose clause).
 >>
>> Try having this on your root controller. You should be able to use an
>> underscore in place of a dot.
>>
>> @expose(template='project.templates.sitemap')
>> def sitemap_xml(self):
>>     return dict()
 >
 > I tried what you had below but it didn't seem to work.  Trying to
 > access http://www.mysite.com/sitemap.xml did not work with the expose
 > decorator as given below.  Maybe I'm missing something....

To make this work, you need to replace "project" with the name of your 
TG project and store your sitemap.xml as project/template/sitemap.kid. 
You'll probably also need to add format='xml', content_type='text/xml' 
parameters to your @expose() since the default output format is html.

However, this is not very efficient and does not guarantee that your 
sitemap.xml file will pass without alteration (whitespace formatting).

Another solution is storing your xml file as project/static/sitemap.xml 
and then using this:

     @expose()
     def sitemap_xml(self):
         raise turbogears.redirect('/static/sitemap.xml')

-- Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to