• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

One must copy all of view.pattern.tmpl in order to change the actions on the topic button row. The definition of "topicactionbuttons" should be factored out to make it easy to override just that bit.

You mean it should be factored out into templates/viewtopicactionbuttons.pattern.tmpl perhaps?

$ more MacrameViewTemplate.txt


%TMPL:INCLUDE{"viewtopicactionbuttons"}% %{ override the the one in "view" }%

%TMPL:P{"formattop"}%%TMPL:P{"attachmentsattop"}%<div class="patternContent">%TMPL:P{"beforetext"}%%TMPL:P{"textcontent"}%
%TMPL:P{"aftertext"}%%TMPL:P{"formatbottom"}%%TMPL:P{"attachmentsatbottom"}%</div><!-- /patternContent-->
$ more WoolViewTemplate.txt


Oh My!

-- AJA

No, actually, I don't. viewtopicactionbuttons is not the same thing as topicactionbuttons. One can redefine any given button by overriding viewtopicactionbuttons, but view.pattern.tmpl defines "topicactionbuttons", which is what creates the bar itself. So, for example, if you want to omit the revision button, you can do a

easily enough, but you get two %SEP%s in the topicactionbar.


Either I don't get it or you don't get it.

All I can say is I've done quite a few custom templates like this:

$ more ShaggieViewTemplate.txt

%TMPL:DEF{"topicactionbuttons"}% Yamma yamma yamma yamma

No I don't have to redifine all of "view" and I can also redefine %SEP%

Meredith, you started by saying:

One must copy all of view.pattern.tmpl in order to change the actions on the topic button row.

I disagree. I've tried illustrating techniques that work for me. I think you're inventing a problem where the real issue is you haven't hit on the right combination. I'd advise experimenting more.

-- AJA

What you're illustrating is doing it in a topic template. What I was referring to (and didn't make clear, obviously) was master templates. That is, I want to have a skin called csa which overrides certain portions of pattern, such as the topicactionbuttons.

While I realize I may have not stumbled on the right combination, Arthur has factored patternskin for a reason. Otherwise, templates like viewtopicactionbuttons.pattern.tmpl wouldn't be necessary: he could have had those defs in view.pattern.tmpl.


How would the inpact on performance be when each button is given a separate template?


I am not suggesting that each button be given a separate template or, as I think you really meant, a separate tmpl file. I am, however, suggesting that each logical area of the page be given a separate file.

I have no problem with viewtopicactionbuttons including definitions for all of the buttons (perhaps even including ones that might well be desirable on the topicactionbar such as reparent) because the template is small and easilky edited, not to mention it's a logical place to look for all of the button definitions. Having= topicactionbar= included in the view template is another matter, for the reasons I've tried to describe above.

The real problem may lie in the unintuitive template paths, which I discuss in TWiki:Codev.TemplatePathIsCounterintuitive. Perhaps resolving the template search path issue would resolve this as well.


I think I get it now, so I'm discarding this.


Summary Topic button row too hard to override
ReportedBy TWiki:Main.MeredithLesly

SVN Range Mon, 13 Mar 2006 build 9258
AppliesTo Extension

Priority Enhancement
CurrentState No Action Required

TargetRelease n/a
Edit | Attach | Watch | Print version | History: r12 < r11 < r10 < r9 < r8 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r12 - 2006-03-23 - MeredithLesly
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback