[tw5] Re: Code in code
Eric, I have solved the problem. Have upgraded to a new version of the plugin. It's working. Many thanks for your help Op zaterdag 5 september 2020 om 22:40:18 UTC+2 schreef Eric Shulman: > On Saturday, September 5, 2020 at 12:58:44 PM UTC-7, vinvi...@gmail.com > wrote: >> >> I see what you mean .. Somehow that happened with cut and paste. I don't >> have it in my wiki that way. >> Here's what I've got so far: (The page title will now appear as a link, >> the rest still doesn't work.) >> >> <$macrocall $name="details" sum="<$link/>" src="""<> filter:""[tagtag[NAME-OF-TAG]]">>""" class="alert-primary"/> >> > > I see TWO double-quotes immediately after *filter:* ... there should be > only one. > > -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/238943d0-c15c-462a-819d-8af1d6fed230n%40googlegroups.com.
[tw5] Re: Code in code
Hi Eric Shulman, I see.. Deleted the double quote. Still not working yet. Been working on it for hours now, but I can't figure it out. :(( [image: 2020-09-06 (4).png][image: 2020-09-06 (3).png]. Op zaterdag 5 september 2020 om 22:40:18 UTC+2 schreef Eric Shulman: > On Saturday, September 5, 2020 at 12:58:44 PM UTC-7, vinvi...@gmail.com > wrote: >> >> I see what you mean .. Somehow that happened with cut and paste. I don't >> have it in my wiki that way. >> Here's what I've got so far: (The page title will now appear as a link, >> the rest still doesn't work.) >> >> <$macrocall $name="details" sum="<$link/>" src="""<> filter:""[tagtag[NAME-OF-TAG]]">>""" class="alert-primary"/> >> > > I see TWO double-quotes immediately after *filter:* ... there should be > only one. > > -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5a4083d3-f3f1-402f-9938-1af2b9017670n%40googlegroups.com.
[tw5] Re: Code in code
On Saturday, September 5, 2020 at 12:58:44 PM UTC-7, vinvi...@gmail.com wrote: > > I see what you mean .. Somehow that happened with cut and paste. I don't > have it in my wiki that way. > Here's what I've got so far: (The page title will now appear as a link, > the rest still doesn't work.) > > <$macrocall $name="details" sum="<$link/>" src="""< filter:""[tagtag[NAME-OF-TAG]]">>""" class="alert-primary"/> > I see TWO double-quotes immediately after *filter:* ... there should be only one. -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/5dd0b79b-ed69-49c1-8e4d-8be56ee8a2cco%40googlegroups.com.
[tw5] Re: Code in code
Thanks, I see what you mean .. Somehow that happened with cut and paste. I don't have it in my wiki that way. Here's what I've got so far: (The page title will now appear as a link, the rest still doesn't work.) <$macrocall $name="details" sum="<$link/>" src=""">""" class="alert-primary"/> Op zaterdag 5 september 2020 om 17:33:05 UTC+2 schreef Eric Shulman: > On Saturday, September 5, 2020 at 7:42:26 AM UTC-7, Eric Shulman wrote: >> >> <$link to=<>><$view field="title"/> >> > > Addendum: > > Note that the above syntax can be reduced to just > <$link/> > because the to=... parameter defaults to the <> value, and > the display content defaults to the title being linked > > -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d4826379-f905-4c5a-af8c-dbcbd41508c0n%40googlegroups.com.
[tw5] Re: Code in code
On Saturday, September 5, 2020 at 7:42:26 AM UTC-7, Eric Shulman wrote: > > <$link to=<>><$view field="title"/> > Addendum: Note that the above syntax can be reduced to just <$link/> because the to=... parameter defaults to the <> value, and the display content defaults to the title being linked -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/17d5c866-29aa-4b35-893e-58153171f9a1o%40googlegroups.com.
[tw5] Re: Code in code
On Saturday, September 5, 2020 at 6:36:08 AM UTC-7, vinvi...@gmail.com wrote: > > Also the page title appears, but not as a link. > Something like this should happen: > <$ link to = < >> <$ view field = "title" /> > Are you including all those spaces in your syntax? If so, that is at least part of the problem. TiddlyWiki syntax is very particular. Unlike other programming languages, whitespace is important. There cannot be spaces in between the "$" and the widget name, nor between a parameter name and the "=". Similarly, doubled angle brackets surrounding a variable name must be kept together and there cannot be spaces in the closing "/$widgetname". Extra spaces ARE permitted surrounding "param=value" and in-between widgets (though this can result in spaces being displayed in the output). Thus, the above line of code should properly be written like this: <$link to=<>><$view field="title"/> Similarly, in the <> filter parameter, spaces matter as well. Your filter syntax currently reads as: "[tag] + [tag[NameOfTheTag]]" However, there should not be a space between the "+" and the filter expression that follows. Thus: "[tag] +[tag[NameOfTheTag]]" In fact, while the +[...] syntax can be used to combine two filter expressions (i.e., as an "AND"), you can also write this as: "[tagtag[NameOfTheTag]]" Which also means: has a tag equal to the name AND a tag equal to "NameOfTheTag" Please try fixing your syntax by removing all the errant spaces, and then let me know what happens... -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/0ec53dd1-3aec-491c-9dfe-29935c198d54o%40googlegroups.com.
[tw5] Re: Code in code
Thank you for your response Eric Shulman. But unfortunately it doesn't work. Nothing happens. The bar appears but there is nothing in it. There must be a flaw in it, but I can't find it. I wonder where in the code I can put my text. I have tried in different ways to also be able to put my text somewhere but it does not work. Also the page title appears, but not as a link. Something like this should happen: <$ link to = < >> <$ view field = "title" /> Can you find out why it doesn't work? Op vrijdag 4 september 2020 om 22:26:59 UTC+2 schreef Eric Shulman: > On Friday, September 4, 2020 at 12:58:55 PM UTC-7, vinvi...@gmail.com > wrote: >> >> I have a piece of code that uses details macro from the Shiraz plugin. >> This is the piece of code: >> << details sum: "NameOfCurrentTiddlerHere" "BodyTextHere" class: >> "alert-primary" >> >> It all works fine, but how do I make the current tiddler title appear >> *automatically >> *with: "NameOfCurrentTiddlerHere" as a *link*? >> >> In the place "Body text here" I want a list of links. For this I have the >> following code: >> << list-links filter: "[tag ] + [tag [NameOfTheTag]]" >> >> >> The code is correct but if I paste it between the other code it is not >> working. How do I do this? >> > > As you have discovered, you can't use macro syntax as parameter values > *inside another macro*. > > To get around this, you should use the <$macrocall> widget with *named* > parameters, like this: > <$macrocall $name="details" sum=<> src="""< filter:"[tag] + [tag[NameOfTheTag]]">>""" > class="alert-primary"/> > Note that the src parameter value is surrounded by tripled quotes. This > is needed to allow you to use the regular quote character within the > parameter value. > > Alternatively, if you define a macro to specify the parameter value, you > could write it like this: > \define detailsSrc() <] + > [tag[NameOfTheTag]]">> > > <$macrocall $name="details" sum=<> src=<> > class="alert-primary" /> > > enjoy, > -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/27fbe342-99ed-4b76-aa4c-3dc665b812d6n%40googlegroups.com.
[tw5] Re: Code in code
On Friday, September 4, 2020 at 12:58:55 PM UTC-7, vinvi...@gmail.com wrote: > > I have a piece of code that uses details macro from the Shiraz plugin. > This is the piece of code: > << details sum: "NameOfCurrentTiddlerHere" "BodyTextHere" class: > "alert-primary" >> > It all works fine, but how do I make the current tiddler title appear > *automatically > *with: "NameOfCurrentTiddlerHere" as a *link*? > > In the place "Body text here" I want a list of links. For this I have the > following code: > << list-links filter: "[tag ] + [tag [NameOfTheTag]]" >> > > The code is correct but if I paste it between the other code it is not > working. How do I do this? > As you have discovered, you can't use macro syntax as parameter values *inside another macro*. To get around this, you should use the <$macrocall> widget with *named* parameters, like this: <$macrocall $name="details" sum=<> src="""<] + [tag[NameOfTheTag]]">>""" class="alert-primary"/> Note that the src parameter value is surrounded by tripled quotes. This is needed to allow you to use the regular quote character within the parameter value. Alternatively, if you define a macro to specify the parameter value, you could write it like this: \define detailsSrc() <] + [tag[NameOfTheTag]]">> <$macrocall $name="details" sum=<> src=<> class= "alert-primary" /> enjoy, -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 view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/f9a57d0f-46ae-4f32-b3fe-e68ee3ac7a82o%40googlegroups.com.