Hi David
The tiddler dictionary format is essentially a shortcut way of writing a
JSON tiddler. For example, take this dictionary tiddler:
one: value first
two: value second
It behaves the same as this JSON tiddler:
{
"one": "value first",
"two": "value second"
}
The wrapping in HTML paragraph tags occurs when you transclude a tiddler in
"block mode" versus "inline mode". Block mode parses block structures like
headings, lists and tables while inline mode only parses the inline
elements that would be legal within something like a heading.
At the moment, the easiest way to control which type of transclusion you're
getting is to place a newline after the opening tag to trigger block mode.
Thus this example transcludes by block:
<$transclude target="HelloThere">
<$view field="title"/>
</$transclude>
Removing the newlines makes it transclude by inline run:
<$transclude target="HelloThere"><$view field="title"/></$transclude>
Best wishes
Jeremy.
On Wed, Aug 14, 2013 at 9:08 PM, David Johnston <[email protected]>wrote:
> Having looked at the
> $:/themes/tiddlywiki/snowwhite/colourmappings$:/themes/tiddlywiki/snowwhite/colourstiddlers
> I saw they were of type application/x-tiddler-dictionary.
>
> The concept of a "dictionary" type was appealing to me for simple data
> storage, espcially since in colourmappings transclusion using the following
> {{$:/themes/tiddlywiki/snowwhite/colours##background}} seemed to fetch the
> relevant data from the dictionary definition of background:
>
> When I attempted to use a similar technique for my own uses, I found it
> worked well, however the transcluded data was wrapped in HTML paragraph
> tags.
>
> My query was, is this behaviour intentional? ... as I would be interested
> in using this for "in-line" data placement where I would not want the HTML
> paragraph tags (as they would break the output I was seeking).
>
> My apologies if this is not the correct usage of the tiddler-dictionary as
> a "data-tiddler", however I could not find another way of pulling sectional
> / named data from a tiddler.
>
> If there is another way .. I would love to know how!
>
> Thanks for all the work on TW5, it is looking great,
>
> David
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWikiDev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywikidev.
> For more options, visit https://groups.google.com/groups/opt_out.
>
--
Jeremy Ruston
mailto:[email protected]
--
You received this message because you are subscribed to the Google Groups
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.