[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-30 Thread springer
Tony,

I'll start a new thread, since it's not about transclusion.

-Springer

On Sunday, December 29, 2019 at 12:15:40 AM UTC-5, TonyM wrote:
>
> Springer,
>
> Please describe "Clint Checkett's Redirect macro" because I have no idea 
> what it does, so I can't give an indicator if there is a method to replace 
> it. I am sure I know more than I used to with TW5.
>
> Regards
> Tony
>
> On Sunday, December 29, 2019 at 4:00:44 PM UTC+11, springer wrote:
>>
>> Wow, Tony, thanks so much! I've just poked around the learning edition a 
>> bit, and have enjoyed it so far. I hope your site will help get me ahead of 
>> the curve, though the big dive will probably wait for summer. For now I 
>> have to find the right balance between indulging my geek-impulse (to 
>> understand TW5 well) and responsibly learning just enough (for now) so that 
>> I can back to *using* (and developing bottom-line content for) the site 
>> that I'll be teaching out of in just a couple weeks. After years of 
>> teaching my big course out of TW Classic for about forever (since 2005 
>> actually), it's hard to imagine any other way of organizing information for 
>> students. 
>>
>> I'm still grieving the loss of something like Clint Checkett's Redirect 
>> macro, for reasons much like those mentioned by tobaisch a couple years ago 
>> (in a post to which you responded), and I'm perplexed that nothing like it 
>> seems possible with TW5. But in all other ways, TW5 is looking like such a 
>> runaway boost to everything I already loved about TW Classic!
>>
>> Best,
>>
>> -Springer
>>
>> On Saturday, December 28, 2019 at 10:54:55 PM UTC-5, TonyM wrote:
>>>
>>> Springer,
>>>
>>> I may have mentioned I went through the same as you, making the big jump 
>>> from TWC to TW5 in part you will need to unlearn things. Much more can be 
>>> done in native TW5 than in TWC which demanded plugins a lot more. I can 
>>> recommend downloading a full copy of tiddlywiki.com and making it your 
>>> own to read and experiment. Perhaps tag the doco you understand and need to 
>>> review. I built an earlier version which contains customisations and 
>>> plugins you may want to study https://tiddlywiki.psat.com.au/learn/
>>>
>>> Fee free to ask how here of course.
>>>
>>> Tony
>>>
>>>
>>> On Sunday, December 29, 2019 at 1:34:45 PM UTC+11, springer wrote:

 Tony, thanks! I did just post about it earlier this evening, with a link 
 to my site . 

 I'll look into currentTab... It sounds like I should rewrite my 
 templates, but I'm still just barely treading water with my upgrade 
 process. I'm still very far from getting up to speed with TW5 widgets and 
 macros, and have been cobbling together solutions found on others' pages, 
 with minor patches...

 On Saturday, December 28, 2019 at 8:19:37 PM UTC-5, TonyM wrote:
>
> Springer,
>
> Do detail your issue re tabs, because I think we may already have a 
> solution for tabs, it uses a template to transclude tabs and there is a 
> variable called currentTab available inside each tab.
>
> Regards
> Tony
>
> On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:
>>
>> Tony, I have a feeling your challenge may be related to my question 
>> about finding a way for transclusions to "behave" as I would hope them 
>> to 
>> when the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch 
>> this post... Cheers.
>>
>> On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>>>
>>> Folks,
>>>
>>> To cut a long story short I wanted to challenge the group to see if 
>>> there is a way to extract a tiddler title from an intermediate 
>>> transclude. 
>>> attached and Illustrated below;
>>>
>>> *Why?*
>>> Because in a number of new methods I am developing this is a gap in 
>>> what I can do to simplify the sophisticated (but simple) use of 
>>> transclusions. Such a solution could make even smarter transclude 
>>> methods 
>>> available and reduce the code needed to achieve them, or the need for 
>>> changes in the core to expand designer options when building wikis.
>>>
>>> Here are three tiddlers you can create on Tiddlywiki.com (use JSON 
>>> file if you want)
>>>
>>> Display tiddler
>>> Display Tiddler
>>> Current Tiddler=<>
>>> Display Tiddler=<>
>>>
>>> ;Simple Transclude (1)
>>> {{||intermediate}}
>>>
>>> ;Transclude with tiddlername (2)
>>> {{tiddlername||intermediate}}
>>>
>>> intermediate tiddler
>>> \define intermediate() intermediate
>>> Intermediate Tiddler
>>> Intermediate Tiddler=<>
>>> Current Tiddler=<>
>>> Display Tiddler=<>
>>>
>>> {{||final}}
>>>
>>> final tiddler
>>> final tiddler
>>>
>>> How can I find the tiddler name of the intermediate tiddler 

[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread TonyM
Springer,

Please describe "Clint Checkett's Redirect macro" because I have no idea 
what it does, so I can't give an indicator if there is a method to replace 
it. I am sure I know more than I used to with TW5.

Regards
Tony

On Sunday, December 29, 2019 at 4:00:44 PM UTC+11, springer wrote:
>
> Wow, Tony, thanks so much! I've just poked around the learning edition a 
> bit, and have enjoyed it so far. I hope your site will help get me ahead of 
> the curve, though the big dive will probably wait for summer. For now I 
> have to find the right balance between indulging my geek-impulse (to 
> understand TW5 well) and responsibly learning just enough (for now) so that 
> I can back to *using* (and developing bottom-line content for) the site 
> that I'll be teaching out of in just a couple weeks. After years of 
> teaching my big course out of TW Classic for about forever (since 2005 
> actually), it's hard to imagine any other way of organizing information for 
> students. 
>
> I'm still grieving the loss of something like Clint Checkett's Redirect 
> macro, for reasons much like those mentioned by tobaisch a couple years ago 
> (in a post to which you responded), and I'm perplexed that nothing like it 
> seems possible with TW5. But in all other ways, TW5 is looking like such a 
> runaway boost to everything I already loved about TW Classic!
>
> Best,
>
> -Springer
>
> On Saturday, December 28, 2019 at 10:54:55 PM UTC-5, TonyM wrote:
>>
>> Springer,
>>
>> I may have mentioned I went through the same as you, making the big jump 
>> from TWC to TW5 in part you will need to unlearn things. Much more can be 
>> done in native TW5 than in TWC which demanded plugins a lot more. I can 
>> recommend downloading a full copy of tiddlywiki.com and making it your 
>> own to read and experiment. Perhaps tag the doco you understand and need to 
>> review. I built an earlier version which contains customisations and 
>> plugins you may want to study https://tiddlywiki.psat.com.au/learn/
>>
>> Fee free to ask how here of course.
>>
>> Tony
>>
>>
>> On Sunday, December 29, 2019 at 1:34:45 PM UTC+11, springer wrote:
>>>
>>> Tony, thanks! I did just post about it earlier this evening, with a link 
>>> to my site . 
>>>
>>> I'll look into currentTab... It sounds like I should rewrite my 
>>> templates, but I'm still just barely treading water with my upgrade 
>>> process. I'm still very far from getting up to speed with TW5 widgets and 
>>> macros, and have been cobbling together solutions found on others' pages, 
>>> with minor patches...
>>>
>>> On Saturday, December 28, 2019 at 8:19:37 PM UTC-5, TonyM wrote:

 Springer,

 Do detail your issue re tabs, because I think we may already have a 
 solution for tabs, it uses a template to transclude tabs and there is a 
 variable called currentTab available inside each tab.

 Regards
 Tony

 On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:
>
> Tony, I have a feeling your challenge may be related to my question 
> about finding a way for transclusions to "behave" as I would hope them to 
> when the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch 
> this post... Cheers.
>
> On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>>
>> Folks,
>>
>> To cut a long story short I wanted to challenge the group to see if 
>> there is a way to extract a tiddler title from an intermediate 
>> transclude. 
>> attached and Illustrated below;
>>
>> *Why?*
>> Because in a number of new methods I am developing this is a gap in 
>> what I can do to simplify the sophisticated (but simple) use of 
>> transclusions. Such a solution could make even smarter transclude 
>> methods 
>> available and reduce the code needed to achieve them, or the need for 
>> changes in the core to expand designer options when building wikis.
>>
>> Here are three tiddlers you can create on Tiddlywiki.com (use JSON 
>> file if you want)
>>
>> Display tiddler
>> Display Tiddler
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> ;Simple Transclude (1)
>> {{||intermediate}}
>>
>> ;Transclude with tiddlername (2)
>> {{tiddlername||intermediate}}
>>
>> intermediate tiddler
>> \define intermediate() intermediate
>> Intermediate Tiddler
>> Intermediate Tiddler=<>
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> {{||final}}
>>
>> final tiddler
>> final tiddler
>>
>> How can I find the tiddler name of the intermediate tiddler 
>> here?
>> Intermediate Tiddler=<>
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> One solution is to edit the intermediate tiddler as in the example 
>> and define a variable based on a literal 
>> \define intermediate() intermediate
>> as 

[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread springer
Wow, Tony, thanks so much! I've just poked around the learning edition a 
bit, and have enjoyed it so far. I hope your site will help get me ahead of 
the curve, though the big dive will probably wait for summer. For now I 
have to find the right balance between indulging my geek-impulse (to 
understand TW5 well) and responsibly learning just enough (for now) so that 
I can back to *using* (and developing bottom-line content for) the site 
that I'll be teaching out of in just a couple weeks. After years of 
teaching my big course out of TW Classic for about forever (since 2005 
actually), it's hard to imagine any other way of organizing information for 
students. 

I'm still grieving the loss of something like Clint Checkett's Redirect 
macro, for reasons much like those mentioned by tobaisch a couple years ago 
(in a post to which you responded), and I'm perplexed that nothing like it 
seems possible with TW5. But in all other ways, TW5 is looking like such a 
runaway boost to everything I already loved about TW Classic!

Best,

-Springer

On Saturday, December 28, 2019 at 10:54:55 PM UTC-5, TonyM wrote:
>
> Springer,
>
> I may have mentioned I went through the same as you, making the big jump 
> from TWC to TW5 in part you will need to unlearn things. Much more can be 
> done in native TW5 than in TWC which demanded plugins a lot more. I can 
> recommend downloading a full copy of tiddlywiki.com and making it your 
> own to read and experiment. Perhaps tag the doco you understand and need to 
> review. I built an earlier version which contains customisations and 
> plugins you may want to study https://tiddlywiki.psat.com.au/learn/
>
> Fee free to ask how here of course.
>
> Tony
>
>
> On Sunday, December 29, 2019 at 1:34:45 PM UTC+11, springer wrote:
>>
>> Tony, thanks! I did just post about it earlier this evening, with a link 
>> to my site . 
>>
>> I'll look into currentTab... It sounds like I should rewrite my 
>> templates, but I'm still just barely treading water with my upgrade 
>> process. I'm still very far from getting up to speed with TW5 widgets and 
>> macros, and have been cobbling together solutions found on others' pages, 
>> with minor patches...
>>
>> On Saturday, December 28, 2019 at 8:19:37 PM UTC-5, TonyM wrote:
>>>
>>> Springer,
>>>
>>> Do detail your issue re tabs, because I think we may already have a 
>>> solution for tabs, it uses a template to transclude tabs and there is a 
>>> variable called currentTab available inside each tab.
>>>
>>> Regards
>>> Tony
>>>
>>> On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:

 Tony, I have a feeling your challenge may be related to my question 
 about finding a way for transclusions to "behave" as I would hope them to 
 when the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch 
 this post... Cheers.

 On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>
> Folks,
>
> To cut a long story short I wanted to challenge the group to see if 
> there is a way to extract a tiddler title from an intermediate 
> transclude. 
> attached and Illustrated below;
>
> *Why?*
> Because in a number of new methods I am developing this is a gap in 
> what I can do to simplify the sophisticated (but simple) use of 
> transclusions. Such a solution could make even smarter transclude methods 
> available and reduce the code needed to achieve them, or the need for 
> changes in the core to expand designer options when building wikis.
>
> Here are three tiddlers you can create on Tiddlywiki.com (use JSON 
> file if you want)
>
> Display tiddler
> Display Tiddler
> Current Tiddler=<>
> Display Tiddler=<>
>
> ;Simple Transclude (1)
> {{||intermediate}}
>
> ;Transclude with tiddlername (2)
> {{tiddlername||intermediate}}
>
> intermediate tiddler
> \define intermediate() intermediate
> Intermediate Tiddler
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> {{||final}}
>
> final tiddler
> final tiddler
>
> How can I find the tiddler name of the intermediate tiddler 
> here?
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> One solution is to edit the intermediate tiddler as in the example and 
> define a variable based on a literal 
> \define intermediate() intermediate
> as included in the above.
>
> *However*
>
>- I am looking for a way to avoid editing the intermediate tiddler 
>to provide its name as a literal
>   - I would accept a programmatic way to store the intermediate 
>   name in intermediate but ideally I would like to avoid editing 
>   "intermediate" at all 
>- Is there a way to derive this intermediate tiddler title by 
>other means 

[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread TonyM
Springer,

I may have mentioned I went through the same as you, making the big jump 
from TWC to TW5 in part you will need to unlearn things. Much more can be 
done in native TW5 than in TWC which demanded plugins a lot more. I can 
recommend downloading a full copy of tiddlywiki.com and making it your own 
to read and experiment. Perhaps tag the doco you understand and need to 
review. I built an earlier version which contains customisations and 
plugins you may want to study https://tiddlywiki.psat.com.au/learn/

Fee free to ask how here of course.

Tony


On Sunday, December 29, 2019 at 1:34:45 PM UTC+11, springer wrote:
>
> Tony, thanks! I did just post about it earlier this evening, with a link 
> to my site . 
>
> I'll look into currentTab... It sounds like I should rewrite my templates, 
> but I'm still just barely treading water with my upgrade process. I'm still 
> very far from getting up to speed with TW5 widgets and macros, and have 
> been cobbling together solutions found on others' pages, with minor 
> patches...
>
> On Saturday, December 28, 2019 at 8:19:37 PM UTC-5, TonyM wrote:
>>
>> Springer,
>>
>> Do detail your issue re tabs, because I think we may already have a 
>> solution for tabs, it uses a template to transclude tabs and there is a 
>> variable called currentTab available inside each tab.
>>
>> Regards
>> Tony
>>
>> On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:
>>>
>>> Tony, I have a feeling your challenge may be related to my question 
>>> about finding a way for transclusions to "behave" as I would hope them to 
>>> when the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch 
>>> this post... Cheers.
>>>
>>> On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:

 Folks,

 To cut a long story short I wanted to challenge the group to see if 
 there is a way to extract a tiddler title from an intermediate transclude. 
 attached and Illustrated below;

 *Why?*
 Because in a number of new methods I am developing this is a gap in 
 what I can do to simplify the sophisticated (but simple) use of 
 transclusions. Such a solution could make even smarter transclude methods 
 available and reduce the code needed to achieve them, or the need for 
 changes in the core to expand designer options when building wikis.

 Here are three tiddlers you can create on Tiddlywiki.com (use JSON file 
 if you want)

 Display tiddler
 Display Tiddler
 Current Tiddler=<>
 Display Tiddler=<>

 ;Simple Transclude (1)
 {{||intermediate}}

 ;Transclude with tiddlername (2)
 {{tiddlername||intermediate}}

 intermediate tiddler
 \define intermediate() intermediate
 Intermediate Tiddler
 Intermediate Tiddler=<>
 Current Tiddler=<>
 Display Tiddler=<>

 {{||final}}

 final tiddler
 final tiddler

 How can I find the tiddler name of the intermediate tiddler 
 here?
 Intermediate Tiddler=<>
 Current Tiddler=<>
 Display Tiddler=<>

 One solution is to edit the intermediate tiddler as in the example and 
 define a variable based on a literal 
 \define intermediate() intermediate
 as included in the above.

 *However*

- I am looking for a way to avoid editing the intermediate tiddler 
to provide its name as a literal
   - I would accept a programmatic way to store the intermediate 
   name in intermediate but ideally I would like to avoid editing 
   "intermediate" at all 
- Is there a way to derive this intermediate tiddler title by other 
means in final?
- What if there was a second intermediate tiddler?

 *Hacking*

- Perhaps there is a way to get/set the last tiddler "doing the 
transclude" in "final"  by altering the transclude mechanism?
- What if we could somehow determine the full branch used to get to 
any level deep
   - eg (in final) display intermediate final
   or (in final) display $:/core/ui/Buttons/edit final

 Thanks in advance
 Regards
 Tony

>>>

-- 
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/eae5f8e0-4f52-4b50-94a9-e234695785c5%40googlegroups.com.


[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread springer
Tony, thanks! I did just post about it earlier this evening, with a link to 
my site . 

I'll look into currentTab... It sounds like I should rewrite my templates, 
but I'm still just barely treading water with my upgrade process. I'm still 
very far from getting up to speed with TW5 widgets and macros, and have 
been cobbling together solutions found on others' pages, with minor 
patches...

On Saturday, December 28, 2019 at 8:19:37 PM UTC-5, TonyM wrote:
>
> Springer,
>
> Do detail your issue re tabs, because I think we may already have a 
> solution for tabs, it uses a template to transclude tabs and there is a 
> variable called currentTab available inside each tab.
>
> Regards
> Tony
>
> On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:
>>
>> Tony, I have a feeling your challenge may be related to my question about 
>> finding a way for transclusions to "behave" as I would hope them to when 
>> the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch this 
>> post... Cheers.
>>
>> On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>>>
>>> Folks,
>>>
>>> To cut a long story short I wanted to challenge the group to see if 
>>> there is a way to extract a tiddler title from an intermediate transclude. 
>>> attached and Illustrated below;
>>>
>>> *Why?*
>>> Because in a number of new methods I am developing this is a gap in what 
>>> I can do to simplify the sophisticated (but simple) use of transclusions. 
>>> Such a solution could make even smarter transclude methods available and 
>>> reduce the code needed to achieve them, or the need for changes in the core 
>>> to expand designer options when building wikis.
>>>
>>> Here are three tiddlers you can create on Tiddlywiki.com (use JSON file 
>>> if you want)
>>>
>>> Display tiddler
>>> Display Tiddler
>>> Current Tiddler=<>
>>> Display Tiddler=<>
>>>
>>> ;Simple Transclude (1)
>>> {{||intermediate}}
>>>
>>> ;Transclude with tiddlername (2)
>>> {{tiddlername||intermediate}}
>>>
>>> intermediate tiddler
>>> \define intermediate() intermediate
>>> Intermediate Tiddler
>>> Intermediate Tiddler=<>
>>> Current Tiddler=<>
>>> Display Tiddler=<>
>>>
>>> {{||final}}
>>>
>>> final tiddler
>>> final tiddler
>>>
>>> How can I find the tiddler name of the intermediate tiddler 
>>> here?
>>> Intermediate Tiddler=<>
>>> Current Tiddler=<>
>>> Display Tiddler=<>
>>>
>>> One solution is to edit the intermediate tiddler as in the example and 
>>> define a variable based on a literal 
>>> \define intermediate() intermediate
>>> as included in the above.
>>>
>>> *However*
>>>
>>>- I am looking for a way to avoid editing the intermediate tiddler 
>>>to provide its name as a literal
>>>   - I would accept a programmatic way to store the intermediate 
>>>   name in intermediate but ideally I would like to avoid editing 
>>>   "intermediate" at all 
>>>- Is there a way to derive this intermediate tiddler title by other 
>>>means in final?
>>>- What if there was a second intermediate tiddler?
>>>
>>> *Hacking*
>>>
>>>- Perhaps there is a way to get/set the last tiddler "doing the 
>>>transclude" in "final"  by altering the transclude mechanism?
>>>- What if we could somehow determine the full branch used to get to 
>>>any level deep
>>>   - eg (in final) display intermediate final
>>>   or (in final) display $:/core/ui/Buttons/edit final
>>>
>>> Thanks in advance
>>> Regards
>>> Tony
>>>
>>

-- 
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/6a0600b0-1a47-4a49-9bc1-d415cebb60a5%40googlegroups.com.


[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread TonyM
Springer,

Do detail your issue re tabs, because I think we may already have a 
solution for tabs, it uses a template to transclude tabs and there is a 
variable called currentTab available inside each tab.

Regards
Tony

On Sunday, December 29, 2019 at 11:12:32 AM UTC+11, springer wrote:
>
> Tony, I have a feeling your challenge may be related to my question about 
> finding a way for transclusions to "behave" as I would hope them to when 
> the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch this 
> post... Cheers.
>
> On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>>
>> Folks,
>>
>> To cut a long story short I wanted to challenge the group to see if there 
>> is a way to extract a tiddler title from an intermediate transclude. 
>> attached and Illustrated below;
>>
>> *Why?*
>> Because in a number of new methods I am developing this is a gap in what 
>> I can do to simplify the sophisticated (but simple) use of transclusions. 
>> Such a solution could make even smarter transclude methods available and 
>> reduce the code needed to achieve them, or the need for changes in the core 
>> to expand designer options when building wikis.
>>
>> Here are three tiddlers you can create on Tiddlywiki.com (use JSON file 
>> if you want)
>>
>> Display tiddler
>> Display Tiddler
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> ;Simple Transclude (1)
>> {{||intermediate}}
>>
>> ;Transclude with tiddlername (2)
>> {{tiddlername||intermediate}}
>>
>> intermediate tiddler
>> \define intermediate() intermediate
>> Intermediate Tiddler
>> Intermediate Tiddler=<>
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> {{||final}}
>>
>> final tiddler
>> final tiddler
>>
>> How can I find the tiddler name of the intermediate tiddler here?
>> Intermediate Tiddler=<>
>> Current Tiddler=<>
>> Display Tiddler=<>
>>
>> One solution is to edit the intermediate tiddler as in the example and 
>> define a variable based on a literal 
>> \define intermediate() intermediate
>> as included in the above.
>>
>> *However*
>>
>>- I am looking for a way to avoid editing the intermediate tiddler to 
>>provide its name as a literal
>>   - I would accept a programmatic way to store the intermediate name 
>>   in intermediate but ideally I would like to avoid editing 
>> "intermediate" at 
>>   all 
>>- Is there a way to derive this intermediate tiddler title by other 
>>means in final?
>>- What if there was a second intermediate tiddler?
>>
>> *Hacking*
>>
>>- Perhaps there is a way to get/set the last tiddler "doing the 
>>transclude" in "final"  by altering the transclude mechanism?
>>- What if we could somehow determine the full branch used to get to 
>>any level deep
>>   - eg (in final) display intermediate final
>>   or (in final) display $:/core/ui/Buttons/edit final
>>
>> Thanks in advance
>> Regards
>> Tony
>>
>

-- 
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/2f66a349-222d-4593-88a6-554a6e4d7880%40googlegroups.com.


[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread TonyM
Folks,

I found my own solution to this challenge using wikitext and macros rather 
than a javascript code change. Perhaps one of our backend developers could 
do better, but this works.

The method is to parse the `<> variable to obtain the first 
value not equal to `<>` this may not be true in in some 
circumstances.

In a tiddler tagged $:/tags/Macro
\define pipe() |
\define curlyr() }
\define curlyl() {
\define transcludedTiddler() {{{ 
[removeprefixremovesuffixsplit!match]
 
}}}

Thus if a "transcluded" tiddler contains 
<>
it will return the tiddler in which the variable is specified, blank if 
viewing the tiddler directly.

This macro is included with display/intermediate/intermediate 2 and 
final tiddlers in the attached json

*How would we use this?*

   - This allows your code to obtain the name of the tiddler in which it 
   (the code) resides even if that tiddler has being transcluded.
   - This code could access a field in the transcluded tiddler `<$view 
   tiddler=<> field="fieldname-in-transcluded-tiddler"/>`

I am now working on a way to save in the "first transcluded tiddler" 
`<>` as callingTiddler such that any transclusion that 
occurs in "first transcluded tiddler" can access "from where it was 
transcluded" via the callingTiddler variable.

Regards
Tony





On Tuesday, December 24, 2019 at 11:01:11 AM UTC+11, TonyM wrote:
>
> Folks,
>
> To cut a long story short I wanted to challenge the group to see if there 
> is a way to extract a tiddler title from an intermediate transclude. 
> attached and Illustrated below;
>
> *Why?*
> Because in a number of new methods I am developing this is a gap in what I 
> can do to simplify the sophisticated (but simple) use of transclusions. 
> Such a solution could make even smarter transclude methods available and 
> reduce the code needed to achieve them, or the need for changes in the core 
> to expand designer options when building wikis.
>
> Here are three tiddlers you can create on Tiddlywiki.com (use JSON file if 
> you want)
>
> Display tiddler
> Display Tiddler
> Current Tiddler=<>
> Display Tiddler=<>
>
> ;Simple Transclude (1)
> {{||intermediate}}
>
> ;Transclude with tiddlername (2)
> {{tiddlername||intermediate}}
>
> intermediate tiddler
> \define intermediate() intermediate
> Intermediate Tiddler
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> {{||final}}
>
> final tiddler
> final tiddler
>
> How can I find the tiddler name of the intermediate tiddler here?
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> One solution is to edit the intermediate tiddler as in the example and 
> define a variable based on a literal 
> \define intermediate() intermediate
> as included in the above.
>
> *However*
>
>- I am looking for a way to avoid editing the intermediate tiddler to 
>provide its name as a literal
>   - I would accept a programmatic way to store the intermediate name 
>   in intermediate but ideally I would like to avoid editing 
> "intermediate" at 
>   all 
>- Is there a way to derive this intermediate tiddler title by other 
>means in final?
>- What if there was a second intermediate tiddler?
>
> *Hacking*
>
>- Perhaps there is a way to get/set the last tiddler "doing the 
>transclude" in "final"  by altering the transclude mechanism?
>- What if we could somehow determine the full branch used to get to 
>any level deep
>   - eg (in final) display intermediate final
>   or (in final) display $:/core/ui/Buttons/edit final
>
> Thanks in advance
> Regards
> Tony
>

-- 
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/4861cea6-3503-46c6-b0b0-bc60a78122ee%40googlegroups.com.


transcluded-tiddler.bundle.json
Description: application/json


[tw5] Re: Looking for a transclude trick (Challenge)

2019-12-28 Thread springer
Tony, I have a feeling your challenge may be related to my question about 
finding a way for transclusions to "behave" as I would hope them to when 
the tiddlers they're in get rendered as tabs, etc. Yes? I'll watch this 
post... Cheers.

On Monday, December 23, 2019 at 7:01:11 PM UTC-5, TonyM wrote:
>
> Folks,
>
> To cut a long story short I wanted to challenge the group to see if there 
> is a way to extract a tiddler title from an intermediate transclude. 
> attached and Illustrated below;
>
> *Why?*
> Because in a number of new methods I am developing this is a gap in what I 
> can do to simplify the sophisticated (but simple) use of transclusions. 
> Such a solution could make even smarter transclude methods available and 
> reduce the code needed to achieve them, or the need for changes in the core 
> to expand designer options when building wikis.
>
> Here are three tiddlers you can create on Tiddlywiki.com (use JSON file if 
> you want)
>
> Display tiddler
> Display Tiddler
> Current Tiddler=<>
> Display Tiddler=<>
>
> ;Simple Transclude (1)
> {{||intermediate}}
>
> ;Transclude with tiddlername (2)
> {{tiddlername||intermediate}}
>
> intermediate tiddler
> \define intermediate() intermediate
> Intermediate Tiddler
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> {{||final}}
>
> final tiddler
> final tiddler
>
> How can I find the tiddler name of the intermediate tiddler here?
> Intermediate Tiddler=<>
> Current Tiddler=<>
> Display Tiddler=<>
>
> One solution is to edit the intermediate tiddler as in the example and 
> define a variable based on a literal 
> \define intermediate() intermediate
> as included in the above.
>
> *However*
>
>- I am looking for a way to avoid editing the intermediate tiddler to 
>provide its name as a literal
>   - I would accept a programmatic way to store the intermediate name 
>   in intermediate but ideally I would like to avoid editing 
> "intermediate" at 
>   all 
>- Is there a way to derive this intermediate tiddler title by other 
>means in final?
>- What if there was a second intermediate tiddler?
>
> *Hacking*
>
>- Perhaps there is a way to get/set the last tiddler "doing the 
>transclude" in "final"  by altering the transclude mechanism?
>- What if we could somehow determine the full branch used to get to 
>any level deep
>   - eg (in final) display intermediate final
>   or (in final) display $:/core/ui/Buttons/edit final
>
> Thanks in advance
> Regards
> Tony
>

-- 
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/a0bbc620-ee5f-496a-a679-13ba17b8a902%40googlegroups.com.