Thank you so much! Hope this teaches me to wikify from now on!

I made a tiddler titled $:/core/ui/Buttons/new-class-log-entry-here and put 
your code in it:

\define newtags() [[$(currentTiddler)$]] [[bible study session]]

<$wikify name="Title" text="""<<now "YYYY.0MM.0DD.0hh0mm " 
>><<currentTiddler>>""">

<$button class="tc-btn-invisible">{{$:/core/images/new-journal-button}}
      <$action-sendmessage $message="tm-new-tiddler" title=<<Title>> 
tags=<<newtags>> />
   </$button>

Notes:

* I removed the list filter because the icon wouldn't show up when viewing 
a "preview" of tiddlers containing the icon in the sidebar.
* However when I put {{Class Log - Jane 
Doe||$:/core/ui/Buttons/new-class-log-entry-here}} in the appropriate 
tiddler the icon is both viewable and clickable when that tiddler shows up 
in the sidebar. I have a finite number of students, so it is not too 
onerous to do this for each student.

On Friday, January 8, 2021 at 2:47:52 PM UTC+8 Odin wrote:

> You can use the wikify widget to create a title like that: 
>
> <$wikify name="classLogTitle" text="""<<now "YYYY.0MM.0DD.0hh0mm " >> 
> <<currentTiddler>>""">
>
> And then replace the yellow part with: <<classLogTitle>> to pass the 
> wikified bit as the text. To create the new journal button, you can use the 
> class="tc-btn-invisible" to hides the button part (you'll be left with just 
> text). Now you can replace the text with any icon you want, such as the new 
> journal icon. Also note that the  [[$(currentTiddler)$]] [[bible study 
> session]] part can be removed and the button still works. I am not sure 
> what it is for.
>
> Full solution:
>
>
> \define newtags() [[$(currentTiddler)$]] [[bible study session]]
>
> <$wikify name="Title" text="""<<now "YYYY.0MM.0DD.0hh0mm " >> 
> <<currentTiddler>>""">
>
> <$list filter="[<currentTiddler>prefix[Class Log - ]] ">
> <$button class="tc-btn-invisible">{{$:/core/images/new-journal-button}}
>       <$action-sendmessage $message="tm-new-tiddler" title=<<Title>> 
> tags=<<newtags>> />
>    </$button>
> </$list>
>
> Op vrijdag 8 januari 2021 om 07:14:31 UTC+1 schreef Sapphireslinger:
>
>> I was originally trying to do something like this. Spent hours trying to 
>> figure out what to put in the yellow spot:
>>
>> \define newtags() [[$(currentTiddler)$]] [[bible study session]]
>>
>> <$list filter="[<currentTiddler>prefix[Class Log - ]] ">
>> <$button> Class Log - New Entry
>>       <$action-sendmessage $message="tm-new-tiddler" title=<<now 
>> "YYYY.0MM.0DD.0hh0mm $(currentTiddler)$" >> tags=<<newtags>> />
>>    </$button>
>> </$list>
>>
>> Then I got the bright idea of cloning new-journal-here button and think 
>> the new-journal here icon is smaller and nicer-looking than a grey button. 
>>
>> 1. However could someone please tell me what I ought to have put in the 
>> yellow space?
>>
>> 2. Also, this code seems to take up a lot less space than the 
>> new-journal-here code, not to mention it gets macro'd into any pertinent 
>> tiddlers instead of pasting it over and over again into the pertinent 
>> tiddlers, bloating the wiki. Any way to get it to be the new-journal here 
>> icon instead of a grey button?
>>
>> On Friday, January 8, 2021 at 2:02:50 PM UTC+8 Sapphireslinger wrote:
>>
>>> I am trying to create a new-journal-here button embedded in my tiddler 
>>> "Class Log - Jane Doe". I want it to create a tiddler titled 
>>> "year.month.day hour Class Log- Jane Doe" which is tagged with [bible study 
>>> session] and [Class Log - Jane Doe]
>>>
>>> In other words:
>>> * Title: "date currentTiddler"
>>> * Tags: [bible study session] [currentTiddler]
>>>
>>> I thought all I had to do was clone $:/core/ui/Buttons/new-journal-here 
>>> button, give it the new name $:/core/ui/Buttons/new-class-log-entry-here, 
>>> add [bible study session] to the tags, and embed it in any "Class Log - 
>>> Jane Doe" like tiddlers like so: {{Class Log- Jane 
>>> Doe||$:/core/ui/Buttons/new-class-log-entry-here}}
>>>
>>> Problem:
>>> Clicking that button in the Class - Jane Doe tiddler results in a 
>>> tiddler with the correct tags, but the title only has a date stamp, not 
>>> "date-stamp currentTiddler".
>>>
>>> \whitespace trim
>>> \define journalButtonTags()
>>> [[$(currentTiddlerTag)$]] [[bible study session]]
>>> \end
>>> \define journalButton()
>>> <$button tooltip={{$:/language/Buttons/NewJournalHere/Hint}} 
>>> aria-label={{$:/language/Buttons/NewJournalHere/Caption}} 
>>> class=<<tv-config-toolbar-class>>>
>>> <$wikify name="journalTitle" text="""<$macrocall $name="now" 
>>> format=<<journalTitleTemplate>>/>""">
>>> <$action-sendmessage $message="tm-new-tiddler" title=<<journalTitle>> 
>>> tags=<<journalButtonTags>> journal-date=<<now "YYYY0MM0DD0hh0mm0ss0XXX">>/>
>>> <$list filter="[<tv-config-toolbar-icons>match[yes]]">
>>> {{$:/core/images/new-journal-button}}
>>> </$list>
>>> <$list filter="[<tv-config-toolbar-text>match[yes]]">
>>> <span class="tc-btn-text">
>>> <$text text={{$:/language/Buttons/NewJournalHere/Caption}}/>
>>> </span>
>>> </$list>
>>> </$wikify>
>>> </$button>
>>> \end
>>> <$set name="journalTitleTemplate" value={{$:/config/NewJournal/Title}}>
>>> <$set name="journalTags" value={{$:/config/NewJournal/Tags!!tags}}>
>>> <$set name="currentTiddlerTag" value=<<currentTiddler>>>
>>> <<journalButton>>
>>> </$set>
>>> </$set>
>>> </$set>
>>>
>>

-- 
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/436562a9-cec5-4c01-9636-babd0780c7ccn%40googlegroups.com.

Reply via email to