archive_me1Add my vote for this tag create new tag
, view all tags

Classification-Driven Page Layout

Proposal: Topics view template should be drivable according to an attribute of the topic, such as a form value. This would allow different types of pages to appear differently and according to a set of PageLayouts.

So far I've determined that PatternSkin's TWIKILAYOUTURL can give me some control, but it seems not enough...


Thinking about how home pages should be presented and how some pages should look different to others, it occurred to me that ClassificationDrivenControls was only part of the story. Not only do I want whether a comment box appears by default but the whole layout of the page should too change with a Page Type change.

Hence home pages might have the photo first top LHS, form data at the top in the middle, with the standard links (e.g. TWiki.ChangePassword down the right hand side and the body of the document below, with only what the user wrote about themselves. Standard links would no-longer appear in people's pages, they come from the layout.

Bug Reports again could look different, with the PageLayout incorporating the TWikiControl for a PainMeter.

Feature Requests again visually different, with the PageLayout dictating a DesireMeter.

Feature Brainstorming could feature an Agreementscale by default.



TWiki's view.pattern.tmpl seems to be driven by:


With this definition dictating the positioning of the elements on the page:

%TMPL:DEF{"main"}%%TMPL:P{"topbar"}%<div class="twikiMiddleContainer">%TMPL:P{"leftbar"}%<div class="twikiMain">%BROADCASTMESSAGE%%TMPL:P{"toolbar"}%

and, in turn, this one driving the order of elements in the content piece:

%TMPL:DEF{"content"}%<div class="twikiHidden"><hr /></div><a name="Content"> </a><div class="twikiHidden">Start of topic | <a href="#Actions">Skip to actions</a><hr /></div>
<div class="twikiTopic">
<br class="twikiClear" />
<span class="twikiRight twikiPageNav twikiGrayText"><a href="#PageTop">to&nbsp;top</a></span><br class="twikiClear" />
</div><div class="twikiHidden"><hr />End of topic<br /><a href="#Actions">Skip to action links</a> | <a href="#PageTop">Back&nbsp;to&nbsp;top</a><hr /></div>

If I read it right, PatternSkin now lets me customise the classes used by this definition, but does not let me, for instance, put the form before the content... which is exactly what I want to do for user pages: use the meta data to contain the standard information and then augment this with the person's description of themself.

Perhaps someone can help me out with this? Thanks.

-- MartinCleaver - 02 Oct 2004

You shouldn't be able to see anything below here...

Do you agree or disagree? Please select one of the radio buttons below and click the button.
I 1 - Strongly disagree   2 - Disagree   3 - am Neutral   4 - Agree   5 - Strongly Agree  



As easy as it seems?

Agreements / Disagreements

Do you agree or disagree? Please select one of the radio buttons below and click the button.
I 1 - Strongly disagree   2 - Disagree   3 - am Neutral   4 - Agree   5 - Strongly Agree  




-- MartinCleaver - 02 Oct 2004

Something is not right with the html escaping.

To answer the question: you can either create a skin based on pattern skin, or try to use css positioning. See Zen garden for possibilities.

-- ArthurClemens - 02 Oct 2004

I was hoping to do this without creating a new skin; I am really quite a novice when it comes to CSS. Arthur, can you confirm that you feel I'd have to create a view.x.tmpl file and that its not possible to do with the TWIKILAYOUTURL? Thanks.

-- MartinCleaver - 02 Oct 2004

To get the form to appear above the text you should be able to do it with CSS if TWIKILAYOUTURL could vary depending on form values.

-- SamHasler - 02 Oct 2004

I would need to do some css experiments to see what is possible. But I am very time constrained this week, so I can't offer the results quickly.

-- ArthurClemens - 02 Oct 2004

Thanks Arthur. I should note that where the topics are in a different web I can do this easily enough - I simply make templates/Main and copy templates/view.pattern.tmpl to templates/Main/view.pattern.tmpl, and move

just before the
<div class="twikiTopic">

It does not solve the classification driven piece but might be useful to someone.

-- MartinCleaver - 03 Oct 2004

I believe this is solved by SupportTopicSpecificTemplates, which is available on DevelopBranch. It would still be nice to see how this could be done by CSS.

-- ThomasWeigert - 25 May 2005

Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r12 - 2008-09-12 - TWikiJanitor
  • 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-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.