Tags:
create new tag
, view all tags

Feature Proposal: Enhance Topic Templates with more "sections"

Motivation

TWiki applications + template topics make TWiki powerful. They would be more powerful with a few enhancements.

Description and Documentation

%STARTSECTION{"templateonly"}% is a step in the right direction - content that is only in the template.

Now, let's enhance that in two ways:

  1. sections of content that render only in the copy and not in the topic.
    example
    instructions to the user filling out a "real" page but not needed by the person maintaining the template.
  2. Sections that are copied conditionally, based on passed URLPARAMs
    use case: an application that needs to create multiple kinds of pages with some overlapping content between the three types (but not all content overlaps)

Examples

I could see something like

%STARTSECTION{"copyonly" urlparam="foo"}%

%STARTSECTION{"ifonly" urlparam="foo"}%

Impact

Implementation

-- Contributors: VickiBrown - 18 Sep 2008

Discussion

I think that I kind of understand what you're proposing, but I would like more examples to be sure.

-- RafaelAlvarez - 18 Sep 2008

I do not understand the "sections of content that render only in the copy and not in the topic"

Do you mean that the section is visible when editing the template only but not when viewing the template? If so - why???

-- KennethLavrsen - 19 Sep 2008

Vicki is refering to topic templates used to create new topics - see NewUserTemplate for more.

-- SvenDowideit - 19 Sep 2008

I understood this Sven.

I do not understand why one wants to hide the rendering of text in the template but not in the topics created from the template.

I simply do not understand the usecase for it. The maintainer of the template is the only one using this topic and why will this person want to NOT see a section of text which will later appear in the topics created from the template?

This is why I am unsure I understand the feature in the first place.

The 2nd part of the proposal makes plenty of sense. It is the first part I do not understand the purpose of. Let Vicky explain the motivation for it.

-- KennethLavrsen - 19 Sep 2008

There's a different between a template (a piece of stationery that doesn't "do" anything) and a copy which is now a live document.

A use case for "copy only" might be instructions to a user for filling in a template (something that doesn't need to appear in the template view).

Another use case would be variables that should be set in the "copy" but not on the template itself.

As an example we use a lot, I like to set a variable that dynamically changes the page title based on a form value. In the template, the form is by definition empty (or even absent) and thus this variable is inappropriate to set.

By extension, I could see sections and variables that depend on form values that would show up only on copy (because they look silly rendering in the template where they are by definition incomplete).

-- VickiBrown - 29 Sep 2008

Edit | Attach | Watch | Print version | History: r6 < r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r6 - 2008-09-29 - VickiBrown
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.