[tw] Re: How to interpolate field value into a link?
On Sunday, March 6, 2016 at 11:46:24 AM UTC-8, Cyrus Murphy wrote: > > I think I got it now. I put the tab macro in the makeTab macro call: > > \define makeTab(animal) < species]] [[tabList$animal$]] [[$animal$ FAQ]]" "viewAnimalDetails" > "$:/state/tab">> > > Thanks for your help again Eric. > Yeah... you got it now... (and my last post "crossed in the mail" with yours, so you didn't need the extra help after all!) -- 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 https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/40ad1383-b613-4ca4-8da4-b17bc5758e8a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to interpolate field value into a link?
On Sunday, March 6, 2016 at 11:26:23 AM UTC-8, Cyrus Murphy wrote: > > Thanks Eric. That macro works fine outside of a tab macro, but breaks down > when put in a tab like this: > > < what={{!!animal-type}} /> > [[tabListAnimals]] [[Animal FAQ]]" "viewAnimalDetails" "$:/state/tab">> > > Assuming it's a macro call within macro call issue of some type. I saw > this thread but is for TWC and not sure if there's a simpler solution in > TW5? > There is NO "inline" parsing within parameters in TiddlyWiki. You CAN use a macro or transclusion as the entire value of a widget parameter (i.e., foo={{!!somefield}} or foo=<>), but you can't just embed a widget or macro call *inside* a parameter value and have it automatically expanded in place. That is the job of a TW *macro* definition: to assemble wiki syntax from parts and pieces. To achieve your goal, you need to write a macro that outputs a complete, valid <> macro to be parsed as wikitext. Something like this: \define animalTabs(what) <> \end <$macrocall $name="animalTabs" what={{!!animal-type}} /> -e -- 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 https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/1f03a4e8-4711-4809-bde9-cc8438038fe6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to interpolate field value into a link?
I think I got it now. I put the tab macro in the makeTab macro call: \define makeTab(animal) <> Thanks for your help again Eric. On Sunday, March 6, 2016 at 12:26:23 PM UTC-7, Cyrus Murphy wrote: > > Thanks Eric. That macro works fine outside of a tab macro, but breaks down > when put in a tab like this: > > < what={{!!animal-type}} /> > [[tabListAnimals]] [[Animal FAQ]]" "viewAnimalDetails" "$:/state/tab">> > > Assuming it's a macro call within macro call issue of some type. I saw > this thread but is for TWC and not sure if there's a simpler solution in > TW5? > > > https://groups.google.com/forum/#!searchin/tiddlywiki/macro$20within$20macro/tiddlywiki/sulPj4CJ9rY/lUqyQ7OLIMAJ > > > On Friday, March 4, 2016 at 10:54:35 PM UTC-7, Eric Shulman wrote: >> >> On Friday, March 4, 2016 at 9:22:51 PM UTC-8, Cyrus Murphy wrote: >>> >>> What am I missing? >>> >> >> macros. >> >> In TW5, when you want to assemble wiki syntax from bits and pieces, you >> write a macro and then pass the various bits to it as parameters. >> >> Something like this: >> >> \define makelink(what) [[About $what$ species]] >> >> <$macrocall $name="makelink" what={{!!animal-type}} /> >> >> There's lots more you can do with macros (and variables). Check the >> "references" section on TiddlyWiki.com for the basics. >> >> enjoy, >> -e >> Eric Shulman >> TiddlyTools / ELS Design Studios >> InsideTiddlyWiki: The Missing Manuals >> > -- 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 https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/9df9bb7a-9564-4787-9970-c34b0e33c5eb%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to interpolate field value into a link?
Thanks Eric. That macro works fine outside of a tab macro, but breaks down when put in a tab like this: < [[tabListAnimals]] [[Animal FAQ]]" "viewAnimalDetails" "$:/state/tab">> Assuming it's a macro call within macro call issue of some type. I saw this thread but is for TWC and not sure if there's a simpler solution in TW5? https://groups.google.com/forum/#!searchin/tiddlywiki/macro$20within$20macro/tiddlywiki/sulPj4CJ9rY/lUqyQ7OLIMAJ On Friday, March 4, 2016 at 10:54:35 PM UTC-7, Eric Shulman wrote: > > On Friday, March 4, 2016 at 9:22:51 PM UTC-8, Cyrus Murphy wrote: >> >> What am I missing? >> > > macros. > > In TW5, when you want to assemble wiki syntax from bits and pieces, you > write a macro and then pass the various bits to it as parameters. > > Something like this: > > \define makelink(what) [[About $what$ species]] > > <$macrocall $name="makelink" what={{!!animal-type}} /> > > There's lots more you can do with macros (and variables). Check the > "references" section on TiddlyWiki.com for the basics. > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios > InsideTiddlyWiki: The Missing Manuals > -- 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 https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/78fe877b-0443-4ecd-9c33-aed4dde7f7dc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[tw] Re: How to interpolate field value into a link?
On Friday, March 4, 2016 at 9:22:51 PM UTC-8, Cyrus Murphy wrote: > > What am I missing? > macros. In TW5, when you want to assemble wiki syntax from bits and pieces, you write a macro and then pass the various bits to it as parameters. Something like this: \define makelink(what) [[About $what$ species]] <$macrocall $name="makelink" what={{!!animal-type}} /> There's lots more you can do with macros (and variables). Check the "references" section on TiddlyWiki.com for the basics. enjoy, -e Eric Shulman TiddlyTools / ELS Design Studios InsideTiddlyWiki: The Missing Manuals -- 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 https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/aa691ca8-8cf0-4f42-8e9e-5ed416ba37a1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.