Hi Tobias

It sounds like you were expecting "list-before" and "list-after" to work
differently than they do. They affect the ordering of tiddlers that carry a
particular tag, and are not a mechanism for arbitrarily inserting content
after specified tiddlers.

> That got me thinking that it might be quite powerful to be able to define
some tiddler as to be rendered whenever certain other (shadow) tiddlers are
being rendered / transcluded.

It sounds like monkey patching.

> I can imagine that there might be a performance impact to this, but it
would sure make customizing the output a whole lot more flexible.

Well, it's a solution to a problem that is already solved in the TiddlyWiki
core, and I'm not sure whether this is any better. It makes it easier to
customise things that haven't been engineered with a system tag, but that
seems to me to just increase dependencies between user markup and core
markup. Better to engineer the right adaptation points I think.

Best wishes

Jeremy.




On Thu, Nov 13, 2014 at 5:37 PM, Tobias Beer <[email protected]> wrote:

> Hi Jeremy,
>
> After you showed me
> <https://groups.google.com/d/msg/tiddlywiki/YEgHhQ0ZcFo/8oS__hRhnLIJ> how
> to use *insert-after* to render conditional content with
> *$:/tags/ViewTemplate*, I tried to experiment a little rendering
> something *non-intrusively* at the bottom of the sidebar below
> *$:/core/ui/SideBarLists*.
>
> http://tb5.tiddlyspot.com/#%24%3A%2Ftemplate%2FAfterSidebar
>
> Turns out, that didn't quite work, as I realized that the *ListField* for
> *$:/tags/PageTemplate* only entails the toplevel elements, so that
>
> *list-after => $:/core/ui/**SideBarLists*
>
> ...won't have any effect as it's not part of the *ListField*. So,
> *list-after* and *list-before* really only apply to the *ListField*, not
> DOM elements or tiddlers being rendered.
>
> ———
>
> That got me thinking that it might be quite powerful to be able to define
> some tiddler as to be rendered whenever certain other (shadow) tiddlers are
> being rendered / transcluded.
>
> Here is how that could work:
>
>    1. give *the tiddler* the tag of the corresponding *shadow tiddler*
>    2. define the field *render*
>    3. set the field value for *render* to either of *appendTo*,
>    *prependTo*, *insertAfter*, *insertBefore*
>    4. transclude *the tiddler* accordingly whenever the *shadow tiddler*
>    being referred to is rendered
>
> I can imagine that there might be a performance impact to this, but it
> would sure make customizing the output a whole lot more flexible.
>
> ———
>
> As it is in the context of tagging, the documentation
> <http://tiddlywiki.com/#Tagging> on *list-after* and *list-before *doesn't
> say too much about how it is being used for templating, e.g.:
>
>    - what system-tags is this relevant for
>    - how to figure out the rendering order / elements / available
>    placeholders
>    - etc...
>
> I think it would be good to find some details on this at...
>
> http://tiddlywiki.com/#SystemTags
>
> Best wishes, Tobias.
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeremy Ruston
mailto:[email protected]

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/d/optout.

Reply via email to