Hi all
mistake at the end :
\>\>"'
would work fine
Thank you all
Julien
On Friday, June 13, 2014 9:46:50 PM UTC+2, julien bouchez wrote:
>
> Eric,
>
> thank you for the " = %22 I knew I was messing with double quote but did
> no know how to google for equivalence...
>
> in [[testTiddled]] I get :
>
> newJournal title:%22testTiddler YYYY_0MM_0DD_0hh_0mm_0ss%22
> focus:%22title%22 text:store.getTiddlerText(%22CompanyTemplate%22)/}/}
> label:%22Company Company testTiddler%22/>/> newJournal
> title:%22testTiddler YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
> text:store.getTiddlerText(%22ConstantsTemplate%22)/}/} label:%22Constants
> Constants testTiddler%22/>/> newJournal title:%22testTiddler
> YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
> text:store.getTiddlerText(%22PartsTemplate%22)/}/} label:%22Parts Parts
> testTiddler%22/>/> newJournal title:%22testTiddler
> YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
> text:store.getTiddlerText(%22PeopleTemplate%22)/}/} label:%22People People
> testTiddler%22/>/> newJournal title:%22testTiddler
> YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
> text:store.getTiddlerText(%22PlanningTemplate%22)/}/} label:%22Planning
> Planning testTiddler%22/>/> newJournal title:%22testTiddler
> YYYY_0MM_0DD_0hh_0mm_0ss%22 focus:%22title%22
> text:store.getTiddlerText(%22QuotationsTemplate%22)/}/} label:%22Quotations
> Quotations testTiddler%22/>/>
>
> I don't know why it does not start the newJournal macro...
>
>
> On Friday, June 13, 2014 8:11:58 PM UTC+2, Eric Shulman wrote:
>>
>> 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.