TiddlyTemplating and Template Variables

56 views
Skip to first unread message

funkyeah

unread,
Mar 2, 2012, 2:14:53 PM3/2/12
to tiddl...@googlegroups.com
I am in the process of learning to use the abilities of TiddlyWiki to implement templates. I've done some research on this and decided that their needs to be a wiki article on tiddlywikidev.tiddlyspace.com or somewhere else that explains how to use the templating mechanisms that tiddlywiki affords. To this extent I've started on the wikipage while learning it through implementing a few examples.

I've run into a limitation that may have an easy answer but was hoping to get some help on it.

I am using the TemplatePlugin: http://svn.tiddlywiki.org/Trunk/contributors/JonathanLister/plugins/TemplatePlugin.js

I started with a form and specifically a dropdown:
        <select id="style-select">
            <option>Select something...</option>
            <option>Drop down 01</option>
            <option>Drop down 02</option>
        </select>

I want the drop-down options auto populated so I changed it to this:

<select id="style-select">
    <<templateTiddlers template:BeerStyles_selectTemplate>>
</select>

Where the BeerStyles_selectTemplate is:

<option>
<<templateTiddlers BeerStyles>>
</option>

And this is where it breaks down... the tiddler BeerStyles is supposed to contain at least a list but potentially a list of tiddlers. I realize that the templateTiddlers and templateTags macros only iterate through tiddlers and tags respectively so trying to get them to iterate through a <br> separated list within a tiddler is not the way its supposed to work, but I don't really see an alternative way to do something like this. It seems like there should be a way to do this and I'm just not aware of it. If you help me I can promise to document it in the dev space. (which on a separate note there should be a lot more of in this group)

Eric Shulman

unread,
Mar 2, 2012, 3:56:26 PM3/2/12
to TiddlyWiki
> I started with a form and specifically a dropdown:
>         <select id="style-select">
>             <option>Select something...</option>
>             <option>Drop down 01</option>
>             <option>Drop down 02</option>
>         </select>
>
> I want the drop-down options auto populated ...
> iterate through a <br> separated list within a tiddler...
> an alternative way to do something like this. It seems
> like there should be a way to do this and I'm just not aware of it.

http://www.TiddlyTools.com/#ListboxPlugin
http://www.TiddlyTools.com/#ListboxPluginInfo

enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios

----
WAS THIS ANSWER HELPFUL? IF SO, PLEASE MAKE A DONATION
http://www.TiddlyTools.com/#Donations
note: donations are directly used to pay for food, rent,
gas, net connection, etc., so please give generously and often!

Professional TiddlyWiki Consulting Services...
Analysis, Design, and Custom Solutions:
http://www.TiddlyTools.com/#Contact
Reply all
Reply to author
Forward
0 new messages