Lee McFadden wrote: > On 12/11/06, Nick Murdoch <[EMAIL PROTECTED]> wrote: >> Hi all, >> >> I'm considering writing a turbogears application whose purpose will be >> to serve as included content in another website. (using server-side >> includes or PHP includes, etc) >> >> So basically I want to output >> <div> >> ... more markup ... >> </div> >> without any html or body tags surrounding it. >> >> The problem I'm having is that I can't get Kid to generate content that >> doesn't have either a DOCTYPE or an <?xml ...> line at the beginning >> of the page. I've tried setting the output format to html, xhtml, and >> xml. >> > > You can add the `fragment=True` keyword to your expose decorator: > > @expose(template=".templates.fragment_template", fragment=True) > def themethod(self): > return dict() > > This should prevent Kid from adding doctypes and the like to your output. > > Lee >
Ah, thanks! That works, cheers. Nick Murdoch --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

