On Friday, June 13, 2014 10:41:56 AM UTC-7, julien bouchez wrote:
>
> [[FetNewHere]]
> <<forEachTiddler
> where
> 'tiddler.tags.contains("twTypes")'
> write
> '" <<newJournal title:"$1 YYYY_0MM_0DD_0hh_0mm_0ss" focus:"title"
> text:{{store.getTiddlerText(""+tiddler.title+""Template")/}/}
> label:"+tiddler.title+" [["+tiddler.title+"]] [[$2]]/>/>"'
> >>
> I don't manage to have this last piece of code working.
> Could you please help me ?
>
>
Your use of double-quotes is the problem. ForEachTiddler clauses (such as
the "write") clause, use single-quotes to surround the entire clause and
double-quotes to construct the "string expression" within that clause.
However, the string expression you are using contains TW macro syntax
which uses double-quotes around it's parameters. Unfortunately, you can't
"nest" the double-quotes... so the first double-quote in your macro syntax
ENDS the ForEachTiddler string expression, rather than being literal quotes
in the output.
One way to avoid this is to use the javascript "hex code" for the literal
quote characters: %22
<<forEachTiddler
where
'tiddler.tags.contains("twTypes")'
write
'" <<newJournal title:%22$1 YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
text:{{store.getTiddlerText(%22"+tiddler.title+"Template%22)/}/}
label:%22"+tiddler.title+" [["+tiddler.title+"]] [[$2]]%22/>/>"'
>>
Let me know how it goes...
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
YOUR DONATIONS ARE VERY IMPORTANT!
HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"...
http://TiddlyTools.github.com/fundraising.html#MakeADonation
Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.