Saq,

Thanks, 

So it externalises the determination of the view template "pieces" to use 
given provided conditions?

This seems like a very helpful hack, Using import variable on such 
templates we would also be able to reduce the global macros needed for 
specific macros for a given template. 

I would like to use this to replace the edit mode field handling with a 
customised one on particular tiddlers.

I use a tiddler field called object-type each value of which may have its 
own view and edit templates, a template tiddler, and more so this may make 
this easier without modifying the Viewtemplate order to accomodate 
additions.

Regards
Tony



On Monday, May 25, 2020 at 10:44:39 PM UTC+10, Saq Imtiaz wrote:
>
> @TonyM in short this allows you to completely override and replace any 
> part of the ViewTemplate (or Edit) that you want to.
> Look at Joshua's example for $:/config/ViewTemplate/Body from above.
>
> [tag[$:/tags/Macro]then[$:/plugins/joshuafontany/core/ui/ViewTemplate/body
> /macro]]
> [tag[Glossary]then[$:/plugins/joshuafontany/silatglossary/ui/ViewTemplate/
> body]]
> [match[Test]then[$/plugins/joshuafontany/core/ui/ViewTemplate/body/TEST]]
>
> For the subtitle you would use similar filters in 
> $:/config/ViewTemplate/subtitle
>
>
> On Monday, May 25, 2020 at 2:29:09 PM UTC+2, TonyM wrote:
>>
>> Joshua,
>>
>> Can you share what the implications are in your mind?
>>
>> I now have Timimi on Chrome, and read the forum in chrome. I found a nice 
>> workflow. 
>>
>>    - Download the json files to a my scratch folder, but they sit in the 
>>    browser footer tray
>>    - Go to Tiddlywiki.com drag the json files from the footer tray on 
>>    top of tiddlywiki.com
>>    - I took the extra step of downloading tiddlywiki.com, double click 
>>    in the download tray to open in a tab and drag the json to that for a 
>>    Timimi savable test.
>>
>> You idea seems like an advance but I need to re-conceptualize this in 
>> relation to all the things I already know about viewTemplates, and how I 
>> would do what I already do.
>>
>> If we are modifying the view Templates there are a few other hackability 
>> issues that would be nice; Given the area you are modifying it makes sense 
>> to raise them here;
>>
>>    - Tags to add items to the subtitle
>>    - Ability to display a prefix or suffix to the title
>>       - eg if chapter number is available display that before title
>>       - even use the tiddlers position in a tag list to obtain the number
>>    - Optional Extra a new float right toolbar under the existing one to 
>>    add contextual buttons
>>       - Ones that appear of disappear on various tiddler or wiki wide 
>>       conditions
>>       - We can already do this with conditional code in buttons, but it 
>>       would help sort them from standard buttons if they had their own 
>> place. 
>>    
>> Either you could incorporate these changes in your templates, with a view 
>> to adding them to the core as well.
>>
>> Regards
>> Tony
>>
>>
>> On Monday, May 25, 2020 at 6:01:53 PM UTC+10, Joshua Fontany wrote:
>>>
>>> Oooooh, wow. This is incredibly powerful.
>>>
>>> PR is up. I have attached a *.json bundle with the tiddlers I am using 
>>> to test the rendering. 
>>> The Title and Subtitle overrides have a `name` field, like a plugin, and 
>>> this triggers a custom view template for each that pushes the title into 
>>> the subtitle, and renders the Name in the <h2>title</h2>. Both obey the 
>>> Titles-a-Links setting in $:/Config > Settings.
>>>
>>> I have also attached a *.json bundle with just the changed 
>>> shadow-tiddlers, so you could actually try this out on tiddlywiki.com by 
>>> dragging both to a tab with it loaded.
>>>
>>> https://github.com/Jermolene/TiddlyWiki5/pull/4681
>>>
>>> Best,
>>> Joshua Fontany
>>>
>>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/fcedcd97-dd4f-441c-a56a-fb7866b87131%40googlegroups.com.

Reply via email to