This question about Topic Markup Language and applications: Answered

How to include rendered content (by VIEW_TEMPLATE)

Screnario:

  • I have several System.DataForms, e.g. FormOne , FormTwo , etc.
  • For each form I designed VIEW_TEMPLATE too, e.g. FormOneViewTemplate FormTwoViewTemplate etc..
  • I have several topices with data, e.g. Topic1WithDataOne , Topic2WithDataOne , Topic1WithDataTwo , each topic have defined VIEW_TEMPLATE and have attached dataform.

What want

Now i looking for a solution what I can best describe with the next hypotetical search

%<nop>SEARCH{
  "fields[name='Active'].value='Yes'"
  type="query"
  nonoise="on"
  format="<div> $percntINCLUDE{ RENDERED_TOPIC_ACCORDING_TO_HIS_DEFINED_VIEW_TEMPLATE }$percnt </div>"
}%

e.g. Want include Topic1WithDataOne AND Topic2WithDataTwo already rendered by his defined VIEW_TEMPLATE. When I use as the format string an simple %INCLUDE{"$topic"}% i got only the %TEXT% part of topic, not the rendered data.

The question: Is possible include the rendered content of topic according to his defined VIEW_TEMPLATE? If yes, how? smile

Probably is possible do this with raw=on full-url-include and removing the un-necessary parts from the html by FilterPlugin, but this is a little bit weird solution, because need another http request for each topic...

thanx in advance.

Sorry for my broken english...


The second http request approach you identified is the only way I can think of to do this. You don't need to use raw or filter the result; just specify a different skin in the request e.g. plain i.e. url?skin=plain - you can even design your own skin templates to provide more customisation.

-- CrawfordCurrie - 11 Mar 2010

QuestionForm edit

Subject Topic Markup Language and applications
Extension
Version Foswiki 1.0.7
Status Answered
Topic revision: r2 - 11 Mar 2010, CrawfordCurrie - This page was cached on 16 Jan 2018 - 10:58.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License