A useful #tiddlywiki conversation with Saq.
[16:39] mahemoff: here is an idea i had for my app - just wondering if anyone else has seen this …
[16:40] mahemoff: i’m thinking of using a field to provide some instructions for certain tiddlers
[16:40] mahemoff: and updating ViewTemplate to render the field to certain users (this is a tiddlyweb app)
[16:41] saqimtiaz: mahemoff: look at the annotations macro
[16:41] mahemoff: ie those with permissions to change the tiddlers
[16:41] mahemoff: ok looking…
[16:41] saqimtiaz: mahemoff: its used by the core to add instructions when editing certain shadow tiddlers
[16:41] saqimtiaz: mahemoff: it stores the text in a config.*something var instead of fields though
[16:41] saqimtiaz: but otherwise the same idea
[16:41] saqimtiaz: mahemoff: a good way to see it in action is to edit the StyleSheet tiddler
[16:41] mahemoff: nice! sounds exactly the kind of thing. i might need to mod it though to show in view mode for certain users
[16:42] saqimtiaz: mahemoff: I think that might be as simple as putting the macro call in the view template
[16:43] mahemoff: yes, but as it’s conditional i’ll probably need to create another macro that invokes the tiddlyweb macro
[16:44] mahemoff: or some hijack-fu
[16:44] saqimtiaz: mahemoff: right. You may just find that its simpler to write a small macro to do it from scratch rather than building on top of this.
[16:45] saqimtiaz: mahemoff: if you’re not familiar with it already, the easiest way to call one macro from inside another is usually the invokeMacro function.
[16:46] mahemoff: ah didn’t actually know that, i did it before manually, thanks.
[16:46] saqimtiaz: mahemoff: another thought. HideWhen plugin from mptw.tiddlyspot.com can be used to add conditional components to templates like the ViewTemplate
[16:46] saqimtiaz: so a combination of say annotation macro or HideWhen macro might do the trick.