[Rest2web-develop] New in SVN: Information about the current page (url, source and target filepath
Brought to you by:
mjfoord
From: Michael F. <fuz...@vo...> - 2006-08-06 12:54:00
|
martin f krafft wrote: > I am getting closer to my goal. Two remaining questions now are > > - how can I get the page object (indextree node) of the page > currently being rendered? Do I really have to do a recursive > search through the tree until thispage is true? > > - I saw the target value, which is the URL of any page relative to > the one currently being rendered. I wonder whether it is > possible to get the URL of the currently rendered page relative > to the root as well? So page_url:target:base_url triplets would > be (for foo/index.txt) > > /index.html:../index.html > /bar.html:../bar.html > /foo/index.html:index.html > /foo/bar.html:bar.html > I've just committed some changes to SVN. These add to the namespace, *and* to pages in the indextree, various pieces of information about the pages : 'source_file': The source file for the page 'current_dir': The current directory being processed - this can be turned into an absolute filepath by doing os.path.join(os.getcwd(), current_dir) 'target_dir': The target file directory (as an absolute file path) being rendered into. Note if the file has a target specified it may not be put in this directory. Use os.path.dirname(target_file) instead. 'full_page_url': The full url (starting with '/') for the current page 'target_file': The full filename of the page being rendered I've also nailed a tricky bug with the finding of 'thispage'. Now to nail the unicode bug, and possibly add an 'include_rest' function. Michael http://www.voidspace.org.uk/python/index.shtml > Thanks, > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > |