Hi!

This is my *$:/core/ui/ViewTemplate/body* (there aren't comments and 
indentation in the real template, I added them here for readability):

<div class="body">

  <$list filter="[is[current]!tag[view-type-1] is[current]!tag[view-type-2
]]">
    <!-- original view -->
    <$transclude />
  </$list>

  <$list filter="[is[current]tag[view-type-1]]">
    <$transclude tiddler="$:/custom/ui/ViewTemplate/view1" />
    <$transclude />
  </$list>

  <$list filter="[is[current]tag[view-type-2]]">
    <$transclude tiddler="$:/custom/ui/ViewTemplate/view2" />
  </$list>

</div>

Maybe there is a better way to filter the tiddlers, but this way works fine 
and it seems fast enough for now (and I like how the filters work very 
much!).
Anyway, adding different views like this is not optimal if they are mutual 
exclusive because the complexity of the filter, at lest the first one for 
the original view, can grow too much.

Moreover, the template uses the "list" widget as an "if" statement, because 
I don't know another way to do the same thing, but I'm missing something 
than can replace the "else" statement to avoid testing all the filters 
every time.
Anyone knows a better syntax to replace mine?


And another question: how can I rewrite this statement 


{{TidData##field_content}}


to use in "$:/custom/ui/ViewTemplate/view2" and load the text from the data 
tiddler called "TidData" (which contains a json) using, as a key, the value 
of the field "field_content" of the "current" tiddler?
Is it possible?


Thanks in advance! :)

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to