I have a similar usecase. 

I collect cases and articles published by doctors and make them seperate 
tiddlers with the name of the case or article as the tiddler's title. I 
have seperate tiddlers for each doctor also with the doctor's name as that 
tiddler's title. 

I give seperate tags for the each doctor's tiddler based on whether he/she 
publish article or case. 
1. if the doctor publishes articles only, he will be tagged with tag 
'Authors' only
2. if the doctor publishes cases only, he will be tagged with tag 
'Consultants' only
3. if the doctor publishes both articles and cases, he will be tagged with 
both tags.

For each case/article by a doctor, i use doctor's name as a
 tag. Additionally i add a field for each case/article.
1. if it is an article - 'field name' - 'what' and 'field value' - 
'article' is given.
2.  if it is an case - 'field name' - 'what' and 'field value' - 'case' is 
given.
 
Finally in the tiddler with title of the doctor, I make a list fliter to 
group the cases and articles under that that doctor seperately. Code i use 
is given below:

<<tabs tabsList:"[tag[doctors-name]what[case]]" default:"dem/24 news" 
class:"tc-vertical">>

<<tabs tabsList:"[tag[doctors-name]what[article]]" default:"dem/24 news" 
class:"tc-vertical">>

Can you suggest how should i modify this code so that it will be 
automatically added into all doctors tiddlers. I tried to make the code 
similar to what you suggested in the previous message, but I don't know 
where to add the field value in that code. Please help.

Similarly I have two tiddlers with title 'Authors' and 'Consultants' in 
which I need to make a list of the doctors who published articles and cases 
respectively along with a list of articles/cases under each doctor. I 
currently TOC code given below for that purpose.

<div class="tc-table-of-contents">
<<toc-selective-expandable "Authors">><<sort by 'title'>>
</div>

<div class="tc-table-of-contents">
<<toc-selective-expandable "Consultants">><<sort by 'title'>>
</div>

But this code will list both cases and articles under each doctor in both 
'Authors' and 'Consultants' tiddlers. Can you suggest a better way to list 
the doctors in Authors and Consultant tiddlers with only their articles or 
cases being shown depending upon whether its Authors tiddler or Consultants 
tiddler. 
On Friday, October 2, 2020 at 8:25:49 PM UTC+5:30 Eric Shulman wrote:

> On Friday, October 2, 2020 at 7:30:07 AM UTC-7, Sapphireslinger wrote:
>>
>> How do I create just one tiddler that commands all book tiddlers to show 
>> that code? Is there just one tiddler I can create that just commands that 
>> code show up in every book tiddler? or every tiddler that happens to have 
>> the tag "book"?
>>
>
> Create a tiddler (e.g., "BookQuotes"), tagged with "$:/tags/ViewTemplate", 
> containing:
> <$list filter="[<currentTiddler>tag[book]]">
>    <$list filter="[tag<currentTiddler>!sort[title]]">
>    <h2><$link><$transclude field="title" mode="block"/></$link></h2>
>
>    <$transclude field="text" mode="block"/>
>    </$list>
> </$list>
>
> Notes:
> 1) The $:/tags/ViewTemplate automatically adds the BookQuotes tiddler 
> content to *every* tiddler
> 2) The outer $list widget makes the content only appear in tiddlers tagged 
> with "book"
> 3) The inside of the $list widget is the output to show.... in this case, 
> the code you posted.
>
> By default, the output appears at the bottom of the standard tiddler 
> ViewTemplate output.  You can change the placement of your output by using 
> drag-and-drop inside the $:/tags/ViewTemplate tag pill displayed with <<tag 
> $:/tags/ViewTemplate>>.
>
> enjoy,
> -e
>
>
>
>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/85f67bce-bd3c-440f-9003-5273f774182dn%40googlegroups.com.

Reply via email to