Categories > TinyButStrong general >

load partial file into template

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: kle_py
Date: 2011-10-20
Time: 18:50

load partial file into template

HI,

i know according to the manual i can include a file inside a template, even with some special parameters like:
[onload;file=header.htm;getbody=(script)+(style)+body]

Is it possible to specify a specific section of the body ?
In my case i would like to include a part of a dokuwiki page - only the info part, without the header, footer etc.
The location in my configuration is at: (body div div div.rightpage) and the "final" div doesn't even have an "id" tag :( - there is only the class "rightpage" identifying the div.

In fact i haven't tested it yet, but would it be possible to include the partial page like
..getbody=div.rightpage
or .. getbody=body+div+div+div.rightpage
??

Thanks
By: Skrol29
Date: 2011-10-20
Time: 22:33

Re: load partial file into template

Hi,

The "getbody" parameter cannot find tags using the ids, only the element type.
If you need more complicated content analysis, you can use parameter "onformat" to retrieve the sub-template content and extract the desired element.
By: kle_py
Date: 2011-10-21
Time: 13:03

Re: load partial file into template

Hi Skrol29,

thanks for the answer.
I will investigate the use of onformat functions soon.

Meanwhile i can take a temporary solution or search for some options in dokuwiki. Maybe i can also simply hide undesired sections using a specially prepared css.

Thanks for the great library