On Friday, April 29, 2016 at 12:24:56 PM UTC+2, [email protected] wrote:
>
>  @Mat
> Thanks for your forpeter tiddler ^^
> Correct me if I'm wrong. You simply avoid my problem by adding a new 
> html-element to the tiddlers (if needed). You gave me a huge playground. If 
> thats work for my ideas that would be great. Again thank you!
> I will post my experience and hopefully succes
>

 So what's happening is thsi

* an image (twaddle)
* create a new viewtemplate (myviewtemplate) -  i.e a tiddler is made up of 
a list of viewtemplates (the title is one, the tags, the body, etc). They 
are all tagged $:/tags/ViewTemplate. You are creating an additional one.
*...and in this viewtemplate, there is the image transclusion.
*The viewtemplate also has a field list-before:$:/core/ui/ViewTemplate/body 
to ensure that the image is before the body viewtemplate because you dont 
want the image do be pushed down from the text in the tiddler body.
*However, this viewtemplate affects all tiddlers. So the image would show 
up in all tiddlers! You want to control this so first step is to block it 
everywhere by wrapping the image transclusion in a div that is styled to 
"display:none"
*...and instead change this to display:block only in tiddlers tagged with 
applymyimage. This is achieved in the stylesheet, using the 
tc-tagged-applymyimage.
*In the stylesheet the image is also styled for position, size etc. You'd 
also add the colored field here. (and you might need to use css 
pointer-events: 
<https://css-tricks.com/almanac/properties/p/pointer-events/>none to 
prevent a color field fro blocking underlying buttons etc)

FYI, I'm also not a coder (yet). A year ago I would not have figured this 
out. But I would also think there are easier/more direct solutions. The 
whole route with a special viewtemplate for just an image feels convoluted 
but that's what I come up with right now. But, the idea to have it 
accessible for every tiddler is appealing if you add loads of things into 
it, i.e have everything display:none and then on a per-tiddler basis 
activate whatever bits you want.

<:-)

-- 
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 https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/f3d42457-e8f8-4fa0-a200-2db01cac5fc2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to