Vincent,

This is quite common but you have not actually described the root cause or 
requirement. You have shown me a partial solution which you have a problem 
making work. 

As a result to answer your question I have to guess your situation, and 
give you a fuller answer, and may still be off target. 

I will do this right now. I thought I would let you know first.

This is my assumption
You may first have a tiddler like this

tiddlera
What is Lorem Ipsum? 

Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 
1500s, when an unknown printer took a galley of type and scrambled it to 
make a type specimen book. It has survived not only five centuries, but 
also the leap into electronic typesetting, remaining essentially unchanged. 
It was popularised in the 1960s with the release of Letraset sheets 
containing Lorem Ipsum passages, and more recently with desktop publishing 
software like Aldus PageMaker including versions of Lorem Ipsum. 
 
Why do we use it? 

It is a long established fact that a reader will be distracted by the 
readable content of a page when looking at its layout. The point of using 
Lorem Ipsum is that it has a more-or-less normal distribution of letters, 
as opposed to using 'Content here, content here', making it look like 
readable English. Many desktop publishing packages and web page editors now 
use Lorem Ipsum as their default model text, and a search for 'lorem ipsum' 
will uncover many web sites still in their infancy. Various versions have 
evolved over the years, sometimes by accident, sometimes on purpose 
(injected humour and the like). 

 
Where does it come from? 

Contrary to popular belief, Lorem Ipsum is not simply random text. It has 
roots in a piece of classical Latin literature from 45 BC, making it over 
2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney 
College in Virginia, looked up one of the more obscure Latin words, 
consectetur, from a Lorem Ipsum passage, and going through the cites of the 
word in classical literature, discovered the undoubtable source. Lorem 
Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et 
Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This 
book is a treatise on the theory of ethics, very popular during the 
Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", 
comes from a line in section 1.10.32.



Then you edit the tiddlera and select the the following
What is Lorem Ipsum? 

Lorem Ipsum is simply dummy text of the printing and typesetting industry. 
Lorem Ipsum has been the industry's standard dummy text ever since the 
1500s, when an unknown printer took a galley of type and scrambled it to 
make a type specimen book. It has survived not only five centuries, but 
also the leap into electronic typesetting, remaining essentially unchanged. 
It was popularised in the 1960s with the release of Letraset sheets 
containing Lorem Ipsum passages, and more recently with desktop publishing 
software like Aldus PageMaker including versions of Lorem Ipsum.

Then you use excise in the toolbar editor buttons

   - And Create Tiddlerb with it tagged tiddlera, and leaving a 
   transclusion behind {{tiddlerb}}
   - You then do this with the other paragraphs tiddlerc and tiddlerd

Now tiddlera looks as if it still contains all three paragraphs but it 
actually contains
{{tiddlera}}

{{tiddlerb}} 

{{tiddlerc}}

Though What I do is;

   - ctrl-t the heading, to cut it and place in clipboard 
   - highlight the paragraph
   - hit excise button (check - Tag new tiddler with the title of this 
   tiddler)
   - ctrl-v in the "Title of New Tiddler" this will past the heading as the 
   tiddler title - your "Descriptive title"
   - Perform Excision

So the tiddlera contains

{{What is Lorem Ipsum?}}

{{Why do we use it?}}

{{Where does it come from?}}

Tag new tiddler with the title of this tiddlerTag new tiddler with the 
title of this tiddlerTag new tiddler with the title of this tiddlerTag new 
tiddler with the title of this tiddler)

However my guess is when looking at tiddlera you would like to be able hide 
the content behind a details tag and present a button when clicked that 
lets you edit the tiddler related to that paragraph.

So if this is the case I suggest you do the following in tiddlera after 
cutting out the paragraphs.

<$list filter="[all[current]tagging[]]">

</$list>
This will list all tiddlers tagged with the current tiddler, in this case 
tiddlera

Now inside the list the currentTiddler variable will change for each 
tiddler found in the filter.

So let us first transclude these other tiddlers to they appear to be part 
of tiddlera, it transcludes current tiddler in the form used below

<$list filter="[all[current]tagging[]]">
 <$transclude/><br><br>
</$list>

But you want the titles from the tiddler to be used. You could use 
<h3>{{!!title}}</h3>

But let us also create a link to the subtiddler with the heading
<$list filter="[all[current]tagging[]]">
 <$link to=<<currentTiddler>> tooltip="Open subtiddler to view or 
edit"><h3><<currentTiddler>></h3></$link>
 <$transclude/>
</$list>
This may be already all you need
Note if your subtiddlers contain CamleCase in their title you may need to 
do this to the above heading.
<h3><$text text=<<currentTiddler>>/> </h3>

What if you want a button to be able to edit each "sub tiddler" directly if 
required", I have placed it inside the heading below.

<$list filter="[all[current]tagging[]]">
 <$link to=<<currentTiddler>> tooltip="Open subtiddler to view or 
edit"><h3><<currentTiddler>>  {{||$:/core/ui/Buttons/edit}}</h3></$link>
 <$transclude/>
</$list>
This will provide a button that if clicked will edit the named tiddler.

*Note for above*

   - All normal tiddler buttons actually operate on the current tiddler so 
   we can locate the button for edit  $:/core/ui/Buttons/edit
   - And transclude it along with the tiddler content, 
   - notice the "||" inside the button transclusion, to ensure it operates 
   on the currentTiddler


Now I also understand you want the tiddlers to be in a details tag here I 
use the html details tag. 
*Important:* the blank lines are needed here, and I will use the summary 
for the title

<$list filter="[all[current]tagging[]]">

<details><summary><$text text=<<currentTiddler>>/></summary>


 <$transclude/>

{{||$:/core/ui/Buttons/edit}}
</details>
</$list>
You click on the title and see the content, you may wish to style this to 
make it more noticable.

*Want more tricks? Just ask here*

- Like a tiddlera internal toc?
- Move the above code into the view template so it works on any tiddler 
with sub-tiddlers by tag, and you do not even need to place the above code 
in any tiddler?
- An internal TOC that lets you change the order of the paragraphs in 
tiddlera
- A Tagpill to change the paragraph order?
- Hide or display the edit button

*Tell me if you need something other than the above?*


Regards
Tony




On Sunday, June 9, 2019 at 2:30:14 AM UTC+10, Vincent vd B wrote:
>
> I think I explain it more complicated than necessary. Tiddler B is 
> transcluded into A. To be able to edit tiddler B, I want a link in the text 
> so that I can open and edit tiddler B with one click. (See [[(A) 
> Descriptive title]] in the code which I now enter manually.) Also when I 
> create a new page I use the snippet function. The less text I have to 
> adjust, the better.
>
> The code you gave me works but I can't use it because it confuses the 
> layout.
>
> TITLE OF TIDDLER B = (A) Descriptive title
> TIDDLER B TEXT =
>
> << details sum: "[[((A) Descriptive title]]"
> "
> TEXT TEXT TEXT
> "class:" alert-primary ">>
>
> Op zaterdag 8 juni 2019 14:05:21 UTC+2 schreef TonyM:
>>
>> Vincent
>>
>> I will give this more time tomorrow.
>>
>> However can you show me how you tranclude tiddler b in tiddler a? In the 
>> code you only list the the titles of tiddlers tagged with tiddler a.
>>
>> I assume because you are using the editor toolbar excise function that it 
>> reads like this in tiddler a
>>
>> {{tiddler b}}
>>
>> Please correct me if I am wrong. I think I have all the answers you need 
>> I just need to be sure of the question. What are you starting from.
>>
>> Regards
>> Tony
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" 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/tiddlywikidev.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywikidev/c03da36f-6b25-4df3-8471-ccfd4035c811%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to