I am doing something very similar.
I achieved this using the inline tabs plugin
I have a project tiddler with this as it's content;
<<tiddler !.Project with: {{tiddler.title}} >>
So it uses it's tiddler name to invoke a generic Project Tiddler that brings
together all it's tiddler lists.
What makes it work (under 2.6.0) is the inline tabs plugin
found via http://tw.lewcid.org/
Where the simple note says;
*create tabs from a single tiddler using an easy {{{<tabs></tabs>}}} syntax.
Get it in the [[sandbox|http://tw.lewcid.org/sandbox]].*
How ever that link is broken so here it is
//{{{
config.formatters.unshift( {
name: "inlinetabs",
match: "\\<tabs",
lookaheadRegExp: /(?:<tabs (.*)>\n)((?:.|\n)*?)(?:\n<\/tabs>)/mg,
handler: function(w)
{
this.lookaheadRegExp.lastIndex = w.matchStart;
var lookaheadMatch = this.lookaheadRegExp.exec(w.source)
if(lookaheadMatch && lookaheadMatch.index == w.matchStart)
{
var cookie = lookaheadMatch[1];
var wrapper = createTiddlyElement(null,"div",null,cookie);
var tabset = createTiddlyElement(wrapper,"div",null,"tabset");
tabset.setAttribute("cookie",cookie);
var validTab = false;
var firstTab = '';
var tabregexp = /(?:<tab
(.*)>)(?:(?:\n)?)((?:.|\n)*?)(?:<\/tab>)/mg;
while((m = tabregexp.exec(lookaheadMatch[2])) != null)
{
if (firstTab == '') firstTab = m[1];
var tab =
createTiddlyButton(tabset,m[1],m[1],story.onClickInlineTab,"tab
tabUnselected");
tab.setAttribute("tab",m[1]);
tab.setAttribute("content",m[2]);
tab.title = m[1];
if(config.options[cookie] == m[1])
validTab = true;
}
if(!validTab)
config.options[cookie] = firstTab;
w.output.appendChild(wrapper);
story.switchInlineTab(tabset,config.options[cookie]);
w.nextMatch = this.lookaheadRegExp.lastIndex;
}
}
})
Story.prototype.switchInlineTab = function(tabset,tab)
{
var cookie = tabset.getAttribute("cookie");
var theTab = null
var nodes = tabset.childNodes;
for(var t=0; t<nodes.length; t++)
if(nodes[t].getAttribute && nodes[t].getAttribute("tab") == tab)
{
theTab = nodes[t];
theTab.className = "tab tabSelected";
}
else
nodes[t].className = "tab tabUnselected"
if(theTab)
{
if(tabset.nextSibling && tabset.nextSibling.className ==
"tabContents")
tabset.parentNode.removeChild(tabset.nextSibling);
var tabContent = createTiddlyElement(null,"div",null,"tabContents");
tabset.parentNode.insertBefore(tabContent,tabset.nextSibling);
wikify(theTab.getAttribute("content"),tabContent);
if(cookie)
{
config.options[cookie] = tab;
saveOptionCookie(cookie);
}
}
}
Story.prototype.onClickInlineTab = function(e)
{
story.switchInlineTab(this.parentNode,this.getAttribute("tab"));
return false;
}
//}}}
My Project tiddler looks like this (Bold for specific example)
*<tabs mytabs>
<tab ProjectTasks>
*~ProjectTasks for "$1"
''Open communications Item(s) - <<tiddler !Count
with:"$1,=comms,-=inactive,-=closed">>''
++++(UrProj)[Urgent Project Tasks]
<<tiddler !Active with: "-=comms,.projectTask,=urgent,$1" "200" "Trash">>
===
+++(WipProj)[WIP Project Tasks]
<<tiddler !Active with: "-=comms,.projectTask,=WIP,-=urgent,$1" "200"
"Trash">>
===
+++(NonUrProj)[Non-Urgent]
<<tiddler !Active with: "-=comms,.projectTask,-=WIP,-=urgent,$1" "200"
"Trash">>
===
*</tab>
*
*<tab Reminders>
*Reminders from Now to 14 days from now
<<showReminders leadtime:0...14 format:"|DIFF|''TITLE''|DATE |In TIDDLER|"
tag:"$1">>
Last week
<<showReminders leadtime:-7...-1 format:"|DIFF|TITLE|DATE|TIDDLER|"
tag:"$1">>
*</tab>
</tabs>*
See if that helps - feel free to ask questions.
Regards
TonyM
If you have not found an easy way to do it with TiddlyWiki, you have missed
something.
www.tiddlywiki.com
On Fri, Mar 26, 2010 at 13:06, Saverio <[email protected]> wrote:
> Yes, but I am trying to make [[ProjectInfo]] generic for any project,
> so I need to be able to send it a parameter. I think that's what
> causes the macros to break down, because the sent parameter does not
> get down to the level of the slices/parts, where they are needed.
>
> On Mar 25, 6:19 pm, Måns <[email protected]> wrote:
> > Ahaa - This works
> > [[ProjectInfo]]
> > <<tabs txtFavourite
> > alpha one "ProjectInfo##Foo"
> > bravo two "ProjectInfo##Bar"
> > >>
> > /%
> > !Foo
> > <<tiddler [[project 1]]>>
> > !end
> > !Bar
> > <<matchTags "#[[%0]] (%2)<br>^^%5^^" "\n" sort:-modified ->>
> > !end
> > %/
> >
> > Please try it out
> >
> > Regards Måns Mårtensson
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<tiddlywiki%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/tiddlywiki?hl=en.
>
>
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/tiddlywiki?hl=en.