anton.aylw...@antonaylward.com said the following on 10/29/2013 09:26 PM:
Thank you Eric.

I've created a View & Edit templates set for "Locations" in my story
writing Tidllywiki with input fields for 'Country" and "City" and they
are fine, perhaps I just need to dress them up a bit with CSS.

What I'm wondering though is how to filter and sort for them in the
parent - list the known location and have a "create new Location"
button.  The latter I understand but I've been experimenting with the
former and haven't 'got it' yet.  Is this someting I can do with slices?

I'm trying 'foreach' and it ... sort of works.
I have

<<forEachTiddler
    where 'tiddler.tags.contains("Locations")'
    sortBy '(store.getValue(tiddler,"Country"))'
    write '"|[["+tiddler.title+" ]]|[["+
           (store.getValue(tiddler,"Country")) +"]]|[["+
           (store.getValue(tiddler,"City")) +"]]|\n"'
>>

and it produces

|Snowdon|Wales|Carnavonshire|
|Ricks Cafe American|[[The County of the Blind]]|[[Metropolis]]|
|Location 2|undefined|undefined|



Why, you ask, do I have a value of [[The Country of the Blind]] in there?
So that its 'clickable' in the LocationsView

Unfortunately I can't figure out how to embed the 'wikify' in the write statement

Maybe I need to store those fields 'raw' and have the LocationsView wikify them. Currently I have in LocationsView

<div class='viewer'><b>Country:</b>&nbsp;<span macro='view country wikified'></span>&nbsp;<b>City:</b>&nbsp;<span macro='view city wikified'></span></div>

but that doesn't converts single words like 'Wales' to links.

I'm learning in fits and bursts but occasionally run out of ideas late at night. This is one.



--
Nothing excites a magical particle like meeting itself coming the other way.
    -- _The Science of Discworld_

--
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 http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to