Ciao Mark S.

I am still playing around with this and thinking about it. I think its 
*really* good. 

More than anything its suggestive of a potential full design to be able to 
handle "placeholders" of all types. So you don't need a footnote plugin, or 
a stretch-text plugin, or manually typing commands for inline v. block 
transclusion,  or ferreting around for transcluded Tiddler that hasn't been 
created yet. You have one in-line interface that handles it all. 

It looks to me as if this one approach could, maybe, handle the whole 
shbang?

I'll comment more fully later.

Best wishes
Josiah

On Sunday, 16 September 2018 00:04:45 UTC+2, Mark S. wrote:
>
> Here's a start that has most of the mentioned features:
>
> \define linkfullname() $(target)$!!linktype
> \define makelink() 
> <$reveal type="nomatch" state="""$(target)$!!caption""" text="">
> <$set name=title tiddler="""$(target)$""" field="caption">
> <$link to="$(target)$"><<title>></$link>
> </$set>
> </$reveal>
> <$reveal type="match" state="""$(target)$!!caption""" text="">
> [[$(target)$]]
> </$reveal>
> \end
> \define maketrans() <$transclude tiddler="""$(target)$""" mode="block"/>
> \define makeedit() {{$(target)$||$:/core/ui/EditTemplate}}
> \define tle(target)
> <$set name="target" value="""$target$""">
> <$reveal type="nomatch" text="yes" state="$:/state/publish">
> <$radio tiddler="""$target$""" field=linktype value="link">L</$radio>
> <$radio tiddler="""$target$""" field=linktype value="trans">T</$radio>
> <$radio tiddler="""$target$""" field=linktype value="edit">E</$radio>
> <$reveal type="match" text="link" state=<<linkfullname>>>
> <<makelink>>
> </$reveal>
> <$reveal type="match" text="trans" state=<<linkfullname>>><br/>
> <<maketrans>>
> </$reveal>
> <$reveal type="match" text="edit" state=<<linkfullname>>><br/>
> <<makeedit>>
> </$reveal>
> </$reveal>
>
> <$reveal type="match" text="yes" state="$:/state/publish">
> <$transclude tiddler="""$target$""" mode="block"/>
> </$reveal>
> </$set>
> \end
>
> $:/state/publish
>
> Publish? 
> <$radio tiddler="$:/state/publish" field="text" value="yes">Yes</$radio>
> <$radio tiddler="$:/state/publish" field="text" value="no">No</$radio>
>
> ----
> <<tle "Your tiddler title here">>
>
> "tle" stands for "Transclusion, Link, Edit". The "edit" part is clumsy 
> since it just uses the edit template without mods to make it flow in the 
> current river. But it basically works and might serve as a start. The 
> "link" element defaults to using the caption if available so you can write 
> more descriptive titles without having to break links. It actually creates 
> the tiddlers just by clicking on the corresponding radio button.  It does 
> this because it stores the current tle setting in the target tiddler. You 
> can put more <<tle>> macros into sub-tiddlers displayed via transclusion, 
> allowing a kind of sub-structure if you want. Though in general I think I 
> would just let the top tiddler provide the structure.
>
> This requires TW 5.1.15 or higher.
>
> Have fun,
> -- Mark
>
> On Thursday, August 30, 2018 at 10:39:08 AM UTC-7, Mark S. wrote:
>>
>> Nice!
>>
>> The next step would be to have a button next to each item that allows you 
>> to switch from link to transclusion. And/or a small link when displayed as 
>> a transclusion so you could quickly edit the text. The current status would 
>> be stored in a flag in the tiddler. The macro might also need a way to 
>> display different text when linking. And also default to using  caption 
>> (ala uni-links) when no  link description is given. There would also be a 
>> master configuration tiddler for final publication that only shows the 
>> transcluded results with no buttons.
>>
>> These ideas are motivated by the need to move quickly between edit/view 
>> modes, and the fact that there is no easy way to change the contents of 
>> macros (or links) globally. So once you've created a title, it's easiest to 
>> stick with it though you may want it to be displayed differently.
>>
>> -- Mark  
>>
>> On Thursday, August 30, 2018 at 9:37:02 AM UTC-7, BurningTreeC wrote:
>>>
>>> I'm just adding my 2cents with an idea:
>>>
>>> a small macro that displays a link if the tiddler is missing, but 
>>> transcludes the tiddler if it's not:
>>>
>>> in a macro-tiddler:
>>>
>>> \define trl(text)
>>> {{$text$||transcludilinktemplate}}
>>> \end
>>>
>>> in the "transcludilinktemplate":
>>>
>>> <$list filter="[<currentTiddler>is[missing]]">
>>> <$link to=<<currentTiddler>>><<currentTiddler>></$link>
>>> </$list>
>>> <$list filter="[<currentTiddler>!is[missing]]">
>>> <$transclude/>
>>> </$list>
>>>
>>> ... call it with <<trl "tiddler title">> and it's a link as long as the 
>>> tiddler doesn't exist and it transcludes it when it does, neat!
>>>
>>>
>>>

-- 
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/7f6615a7-dee4-4cf7-9b5a-a215ec5eca8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to