Re: [Rest2web-develop] About the variable "body"
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2009-03-08 23:38:46
|
mon...@ya... wrote: [snip...] >>> I'm using the definition of "body" in the "uservalues" >>> >> to separate the content from the rest of the stuff >> (restindex). >> >>> >>> >> I don't fully understand the question below. >> >> > > I make something like this (in my index.txt): > > restindex > [bla, bla, bla, ...] > /restindex > uservalues > body: ./contents/some_content.txt > /uservalues > > Where the file "./contents/some_content.txt" are the real contents of the page... > > Don't use the name body - this is already in use for the full body of the page. See this page for the list of names used by rest2web: http://www.voidspace.org.uk/python/rest2web/templating.html > > >>> I would like to reference the original contents file >>> >> (assigned to the variable "body") from my website to create >> a link to download the original file contents in >> reStructuredText format .... >> >>> How do I introduce a variable that contains the file >>> >> name of content ("body") in order to handle it in the html >> template? >> >>> >>> >> Do you want a link to the original text file that creates >> the output? >> >> > > Exactly: i want a link to the file "./contents/some_content.txt". I know how to copy the contents file to the output (ussing "file: ./contents/some_content.txt" but how can i construct a link in the html output file?. I need a variable with the value > "./contents/some_content.txt" in order to make the template... Exists this variable? > You could use pagepath and replace the extension with .txt. Michael > Ruben > > >> Michael >> >> >>> Best regards. >>> >>> >>> >>> >>> >>> >> ------------------------------------------------------------------------------ >> >>> Open Source Business Conference (OSBC), March 24-25, >>> >> 2009, San Francisco, CA >> >>> -OSBC tackles the biggest issue in open source: Open >>> >> Sourcing the Enterprise >> >>> -Strategies to boost innovation and cut costs with >>> >> open source participation >> >>> -Receive a $600 discount off the registration fee with >>> >> the source code: SFAD >> >>> http://p.sf.net/sfu/XcvMzF8H >>> _______________________________________________ >>> Rest2web-develop mailing list >>> Res...@li... >>> https://lists.sourceforge.net/lists/listinfo/rest2web-develop >>> >>> >> -- >> http://www.ironpythoninaction.com/ >> http://www.voidspace.org.uk/blog >> >> >> >> > > > > -- http://www.ironpythoninaction.com/ http://www.voidspace.org.uk/blog |