Is there an workaround for xi:include for remote files?

4 views
Skip to first unread message

Maynard

unread,
Jun 17, 2010, 9:54:22 AM6/17/10
to Genshi
Hello there,

This is my very first post here and, since I'm a newbie on Python
world, this should be a newbie question for most of you.

The thing is, I'm using Pylons with (obviously) Genshi templates but
I can't figure out if there's a way to add a remote file as include to
my documents... I'd like to do something like this:
<xi:include href="htt://www.othersite.com/Header.htm" />

By this, having only one site that might contain all of my static/
basic files such as the Header/Footer templates...

Thank you in advance!

Carsten Klein

unread,
Jun 17, 2010, 12:02:58 PM6/17/10
to gen...@googlegroups.com

> The thing is, I'm using Pylons with (obviously) Genshi templates but
> I can't figure out if there's a way to add a remote file as include to
> my documents... I'd like to do something like this:
> <xi:include href="htt://www.othersite.com/Header.htm" />

You could always implement you own TemplateLoader and override the load()
function. That way you can also include from URLs.

See genshi.template.loader.TemplateLoader for more information.

--

Carsten Klein
Mobil +491 577 666 256 5
carste...@axn-software.de

axn software UG (haftungsbeschr�nkt)
Wipperf�rther Str. 278, 51515 K�rten

Gesch�ftsf�hrung Carsten Klein
HRB 66732, Gerichtsstand Amtsgericht Bergisch Gladbach
Steuernr. 204/5740/0835, USt-IdNr. DE 266 540 939

Telefon +492 268 801 285, Telefax +492 268 801 285
www.axn-software.de, in...@axn-software.de


Reply all
Reply to author
Forward
0 new messages