This question about Using an extension: Answered
Howto get parent topic?
Hi, some of our topics use a search based on the parenttopic and some other parameters to display results. If i try to create a pdf of these topics the
%META{"parent" format="$topic" dontrecurse="on"}%
stops working. It returns nothing, so the searches based on it break.
%SEARCH{"*" topic="%TOPIC%" scope="text" nonoise="on" format="$parent"}%
seems to return the parent even in the pdf. But since we also use includes I would need to use BASETOPIC, which does not work.
Is there anyother way to get the parenttopic, or to get META to work in
GenPDFAddOn? Or is there a way to use BASETOPIC in SEARCH?
Thanks for any help!
Johannes
I am sure I've used both INCLUDINGTOPIC and BASETOPIC in searches that have shown up in pdf via
GenPDFAddOn. I will of course need to check to be sure, but maybe there is something else wrong.
I have a feeling that META are documented to be ignored in pdf generation. I believe that deliberate as META data is often not what you want to appear in a document (almost by definition).
--
JulianLevens - 28 May 2010
Hi, I made a little demo of part of the problem:
Question545Sample It simply includes
Question545SampleSub
Question545Sample has it's parent set to
WebHome Question545SampleSub has it's parent set to
Question545Sample
From my understanding the second search should return
WebHome, since that is the parent of the BASETOPIC...
I know this has nothing to do with the
GenPDFAddOn. It's just because I can't think of any other way to get the parent since META is not working in
GenPDFAddOn.
I understand, that you don't want META-Data to show up in your PDF, but shouldn't it still be accasible? I mean you don't want it to show up in your regular topic rendering either, but still you can use it...
Thanks Johannes
--
JohannesHammersen - 31 May 2010
The problem with your sample searches are that they are looking for the literal asterisk in the topic, Search for "*" is not a wildcard search. If you change this to a regex type search and search for ".*" (dot-Asterisk) then your examples work. I've updated the sandbox topics to demonstrate.
As far as
GenPDFAddOn not expanding the META macro, I've not looked at that extension in quite a while. I'm not sure what is going on with that.
--
GeorgeClark - 21 Jun 2010
Hi, thanks for your answer. That solved the sample. Unfortunatly it still won't work in
GenPDFAddOn. Because if you create a pdf inkl. subtopics it always returns the parrent of the start topic. Even if you are in some subtopic. I gues this is because genpdf uses include for the subtopics and therefor
Question545 will be the BASE of your pdf. So still have no way to get the parrent topic with in
GenPDFAddOn.
--
JohannesHammersen - 22 Jun 2010