[tw] Getting a field value from a transcluded field name

2018-01-24 Thread Steven Schneider
Hi folks,

I've written a macro that identifies and presents tiddlers as slides in a 
slideshow with this: 

<>

My macro sets variable slidetag as follows:
<$set name=slidetag value="""$slidetag$""">


Tiddlers to be included in the slideshow are tagged with the name of the 
show (example: "welcome-to-class") and have a field of the same name 
(example: welcome-to-class) with value = 1 (or 2, etc.)

I want to dynamically set the bgcolor of the tiddlers based on slidenumber.

How do I reference a field that is defined through transclusion? In the 
code below, I'm trying to get the value of the field <> into a 
variable <>

<$list filter="[tag!nsort]" >
<$set name="slidenumber" filter="[all[current]field]">
...
doesn't work.

Suggestions?

Thanks, //steve.


-- 
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/8a4cf45f-12eb-4a8a-82d6-d4ea375cd729%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Getting a field value from a transcluded field name

2018-01-24 Thread Jeremy Ruston
Hi Steve

> How do I reference a field that is defined through transclusion? In the code 
> below, I'm trying to get the value of the field <> into a variable 
> <>
> 
> <$list filter="[tag!nsort]" >
> <$set name="slidenumber" filter="[all[current]field]">
> ...
> doesn't work.

Try

<$list filter="[tag!nsort]">
<$set name="slidenumber" tiddler=<> field="slidetag">
...

The trick is a new feature of the set widget (since 5.1.14) that allows a 
variable to be set directly from a tiddler field (or index).

Best wishes

Jeremy.


> 
> Suggestions?
> 
> Thanks, //steve.
> 
> 
> 
> -- 
> 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/8a4cf45f-12eb-4a8a-82d6-d4ea375cd729%40googlegroups.com
>  
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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/71FCBA35-8CDE-465A-AFD5-38011C32E6FD%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [tw] Getting a field value from a transcluded field name

2018-01-26 Thread Steven Schneider
Thanks, Jeremy.

But, did you mean:

<$list filter="[tag!nsort]">
<$set name="slidenumber" tiddler=<> field=<>>

(It is almost working; i've got something else wrong now :)

//steve.



On Wednesday, January 24, 2018 at 12:45:20 PM UTC-5, Jeremy Ruston wrote:
>
> Hi Steve
>
> How do I reference a field that is defined through transclusion? In the 
> code below, I'm trying to get the value of the field <> into a 
> variable <>
>
> <$list filter="[tag!nsort]" >
> <$set name="slidenumber" filter="[all[current]field]">
> ...
> doesn't work.
>
>
> Try
>
> <$list filter="[tag!nsort]">
> <$set name="slidenumber" tiddler=<> field="slidetag">
> ...
>
> The trick is a new feature of the set widget (since 5.1.14) that allows a 
> variable to be set directly from a tiddler field (or index).
>
> Best wishes
>
> Jeremy.
>
>
>
> Suggestions?
>
> Thanks, //steve.
>
>
>
> -- 
> 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+...@googlegroups.com .
> To post to this group, send email to tiddl...@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/8a4cf45f-12eb-4a8a-82d6-d4ea375cd729%40googlegroups.com
>  
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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/4ca9cb68-e46d-4e64-81d7-4e721dc2de0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.