Am 12.12.2014 07:04, schrieb Stephan Hradek:
Maybe this helps, putting it at the top of each tiddler:

|
\rules only html
|


Thanks Stephan, I tried that, but I failed. Here is an example of what I mean: When using TW as a template engine, you might want to do something like this:

|\rules only html

<$list filter="1 2 3">
<h1 class="<$text text=<<currentTiddler>>/>"><$text 
text=<<currentTiddler>>/></h1>
</$list>|

Notice that "\rule only html" also parses the widgets. (Which is because internally HTML tags are treated as widgets). Thus the output here is:

|1
2
3

= with this underlying html code in the DOM =

<h1 class="<$text text=<<currentTiddler>>/>">1</h1>
<h1 class="<$text text=<<currentTiddler>>/>">2</h1>
<h1 class="<$text text=<<currentTiddler>>/>">3</h1>|

But ideally it would be like this:

|\rules only widgets

<$list filter="1 2 3">
<h1 class="<$text text=<<currentTiddler>>/>"><$text 
text=<<currentTiddler>>/></h1>
</$list>

= Output =

<h1 class="1">1</h1>
<h1 class="2">2</h1>
<h1 class="3">3</h1>|

But from what I have gathered thats not possible.

/Andreas

P.S: You might say: Hey wait a moment Andreas, you can do this:

|\rules only html macrocallblock macrocallinline

<$list filter="1 2 3">
<h1 class=<<currentTiddler>>> <<currentTiddler>> </h1>
</$list>|

And then get to your target HTML by using

|<$view tiddler="targetTiddler" format="htmlwikified"/>|

which will actually work for this instance, but will fail when HTML tags like|<script>|or more complicated widgets are involved. (Which they will be if you are trying to use TW's mechanisms to generate the source code of a website for example.)

Due to this, it is much better to build the content you want to generate with TW and later try to get a good source code out of it, rather than building the desired source code directly. But in my opinion, it should be possible to generate XML based formats from TW (think XSLT, RSS) and using the full potential of the TW widgets.

--
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/d/optout.

Reply via email to