Changes between Initial Version and Version 1 of Ticket #1728


Ignore:
Timestamp:
Dec 13, 2012, 8:56:13 PM (11 years ago)
Author:
Steffen Hoffmann
Comment:

salvaging correct formatting from former comment:1 (deleted) for readability

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1728

    • Property Keywords macro processor renderer nesting added
    • Property Owner changed from Noah Kantrowitz to Ryan J Ollos
  • Ticket #1728 – Description

    initial v1  
    1 if you include a wiki page that itself calls a macro (such as ParentLinkage) then said macro will run with the request information of the containing wiki page (as opposed to the contained wiki page).
     1if you include a wiki page that itself calls a macro (such as !ParentLinkage) then said macro will run with the request information of the containing wiki page (as opposed to the contained wiki page).
    22
    3 This manifests itself when:
    4 [wiki:Parent1\WikiPage1] contains:
     3This manifests itself when: Parent1\!WikiPage1 contains:
     4{{{
    55[[ParentLinkage(=)]]
    6 
    7 and, [wiki:Parent2\WikiPage2] contains:
     6}}}
     7and, Parent2\!WikiPage2 contains:
     8{{{
    89[[ParentLinkage(=)]]
    910[[Include(wiki:Parent1\WikiPage1)]]
     11}}}
    1012
    11 the ouput prints the parentlinkage for Parent2\WikiPage2 twice as opposed to the parentlinkage for Parent2\WikiPage2 followed by Parent1\WikiPage1.
     13the ouput prints the parent linkage for Parent2\!WikiPage2 twice as opposed to the parent linkage for Parent2\!WikiPage2 followed by Parent1\!WikiPage1.
    1214
    1315suggest the following workaround:
    14 1) import wiki_to_html from trac.wiki.formatter
    15 2) under the case where source_format =='wiki' instead out setting out to be page.text,
    16 call wiki_to_html.  You will probably need to pass in a crafted req object based on page.name ... I think the var you need to set is req.hdf.setValue('wiki.page_name',page.name) but I'm not very familiar with Trac ... not sure if that's the best way to go about it or not.
    17 3) at the end, do not call Mimeview.render if the source_format is a wiki  .... since it is already called from the wiki_to_html func.
     16 1. import wiki_to_html from trac.wiki.formatter
     17 2. under the case where source_format == 'wiki' instead out setting out to be page.text, call wiki_to_html. You will probably need to pass in a crafted req object based on page.name ... I think the var you need to set is req.hdf.setValue('wiki.page_name',page.name) but I'm not very familiar with Trac ... not sure if that's the best way to go about it or not.
     18 3. at the end, do not call Mimeview.render if the source_format is a wiki .... since it is already called from the wiki_to_html func.
    1819
     20hope this helps!
    1921
    20 hope this helps!
    21 
     22funny .... I'm trying to suggest some fixes and I can't even remember to use trac properly ... lol... it's late