Hi Jonathan,
That is a great question! I am not sure how to add a conditional rule to
the edit button to check if the tiddlers tag is Recipe, and then code to
open up the recipe editor. This would also lead to change/edit the core
tiddlers, which is not advisable because it makes updating to new versions
tricky.
However, it is possible to add a button that when pressed navigates to the
recipe editor plugin and sets the selection tiddler to the recipe. Here's
how I did it:
<$list filter="[all[current]tag[Recipe]]">
<$button>
<$action-setfield $tiddler="$:/plugins/Odin/Recipe/Selection"
text={{!!title}}/>
<$action-navigate $to="$:/plugins/Odin/Recipe/RecipeEdit"/>
Open this recipe in the Recipe Editor
</$button>
</$list>
The list widgets lists all tiddlers with tags: Recipe (this makes the
button only appear under recipes). Then a button is created that has two
actions upon pressed. First, it sets the selection tiddler to the title of
the recipe on which the button is showing. Then it navigates to the recipe
editor.
Create a new tiddler (title name doesn't matter) and tag it
$:/tags/ViewTemplate. Copy the code above and paste it in. The button will
appear at the end of the recipe. If you want it to appear at some other
place you can add a field 'list-after' or 'list-before' that contains the
title of the tiddler you want to have it appear before/after.
Hope this useful. I might add this functionality next time I spend time
updating the plugin. I was also thinking of adding a course category, i.e:
breakfast, lunch, dinner etc. Which would add another filter to work with.
Op zaterdag 2 januari 2021 om 08:05:30 UTC+1 schreef Jonathan Lundquist:
> Found the https://odinjorna.github.io/recipe-plugin/ because of top
> post. Just one wish... Is there a way to make the edit button for any
> tiddler tagged 'Recipe' open in the recipe editor, instead of the default
> editor which is useless for recipes created with the plugin?
>
> On Thursday, December 31, 2020 at 2:56:40 AM UTC-8 Odin wrote:
>
>> ...
>>
> 10) My own recipe plugin ; - )
>> <https://odinjorna.github.io/recipe-plugin/>
>>
> ...
>>
>
--
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/cdfb192e-65cb-42ac-a64f-216e2f0f9b97n%40googlegroups.com.