The magic of MPTW

65 views
Skip to first unread message

Poul

unread,
Mar 24, 2012, 8:33:36 AM3/24/12
to tiddl...@googlegroups.com
Hi guys,

I could use a bit of help with this one: As you may know, I adapted Simon Baird's excellent work at http://mptw.tiddlyspot.com/
as an optional alternative page template in giewiki. Recently I used it for a sample application of the custom tiddler templates facility, that I've added in giewiki 1.16.
Specifically, I have a ViewTemplate (derivative) that starts like this:
<div><span macro='view topic'></span><span class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></span></div>
in stead of the classic
<div class='toolbar' macro='toolbar [[ToolbarCommands::ViewToolbar]]'></div>
If I use the MPTW page template, I get the result I'm hoping for, ie. a left-aligned span showing the value of the 'topic' field and the usual right-aligned toolbar, like this:
If I do not use it, I don't get quite what I want (the toolbar isn't right-aligned):
What exactly is it that Simon did to make it work (and why doesn't it work otherwise)?

Thanks,
Poul


Poul

unread,
Mar 24, 2012, 8:39:15 AM3/24/12
to tiddl...@googlegroups.com
NB: In both cases, it isn't actually ViewTemplate that's used for view template, but rather newsViewTemplate. 

/Poul

cmari

unread,
Mar 24, 2012, 9:07:02 AM3/24/12
to tiddl...@googlegroups.com
I'm not sure where it would need to be inserted in your specific use case, but this line in the Stylesheet seems to be the important one:

.toolbar { float:right; }

cmari

Poul

unread,
Mar 24, 2012, 5:24:54 PM3/24/12
to tiddl...@googlegroups.com
You're absolutely right, thanks. twcomp.html, line 348:
.toolbar {text-align:right; font-size:.9em; float:right }

:-) Poul
Reply all
Reply to author
Forward
0 new messages