Is there a way to detect whether a wiki is launched as permalink ... and modify the startup-behaviour in that case?

101 views
Skip to first unread message

Jan

unread,
Nov 14, 2019, 6:02:29 PM11/14/19
to TiddlyWiki
Hi everybody.
My wiki is starting in a sort of Kanban-View by default.
Is it possible to disable the triggering of the ViewTemplate in the
startup-actions when the wiki started with a permalink?

Ahoi! Jan

TonyM

unread,
Nov 14, 2019, 10:58:36 PM11/14/19
to TiddlyWiki
Jen

How is your Kanban view loading?, Is it in a tiddler in the default tiddlers? Are you using a particular plugin for kanban?

Here is a permalink for tiddlywiki.com https://tiddlywiki.com/#InfoMechanism . It will open only the specified tiddler by default.

More sophisticated startup actions than the default see Jeds Startup actions.


Regards
Tony

Jan

unread,
Nov 15, 2019, 3:45:57 AM11/15/19
to tiddl...@googlegroups.com
Hi Tony,
the Kanban is my own, the initial view is triggered by a startup-action which is setting a tiddler called "$:/state/stage" to "Kanban".
I would like to stop that startupaction if the url is a permalink pointing to a specific tiddler.
Thanks for reminding me of Jed's startup-actions. I had forgotten them because of the core feature.

Ahoi ! Jan
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/d23380db-f553-478b-9208-43cccd0d2aeb%40googlegroups.com.

TonyM

unread,
Nov 15, 2019, 6:23:04 AM11/15/19
to TiddlyWiki
Is there a reason you are not using default tiddlers to load the kanban? Then permalink bypasses it.

Tiddly wiki loads a different tiddler normally. You can also put sophisticated filters in default tiddlers if that helps.

You put the action in that's defeating the default action so can you change it?

Look for the $:/info tiddlers

regards
Tony

Jed Carty

unread,
Nov 15, 2019, 7:22:07 AM11/15/19
to TiddlyWiki
I did some experiments a while ago and made wikis that would use the url to affect how the wiki booted as part of my earlier work with twederation. It is very possible and if I remember correctly not too terribly difficult to code, but it requires changing some of the wiki boot process which always runs the risk of breaking everything.

There is probably a better way using hooks to change the behaviour based on the url but I don't think I have the time to play with that right now.

I don't know if there is any reason to use the start-up actions that I made rather than the core version. If I remember correctly the core version is coded significantly better and is more stable than mine.

PMario

unread,
Nov 15, 2019, 9:19:05 AM11/15/19
to TiddlyWiki
Hi Jan,

TW contains some info tiddlers: https://tiddlywiki.com/prerelease/#InfoMechanism

It should be possible to add the https://developer.mozilla.org/en-US/docs/Web/API/URL/hash info.

Some experiments will be needed. Especially if and how we can use it in a TW-way

-m

PMario

unread,
Nov 15, 2019, 9:35:51 AM11/15/19
to TiddlyWiki
From my experiments, it's possible to get the "initial" hash. So it should be possible to compare it with reveal-match and do all sorts of things.

GitHub PR will follow soon.

-m

PMario

unread,
Nov 15, 2019, 9:44:20 AM11/15/19
to TiddlyWiki

TonyM

unread,
Nov 17, 2019, 1:28:40 AM11/17/19
to TiddlyWiki
I still think this requirement is around the wrong way but I have already used the ?string on the url to pass data into a wiki. It appears in one of the info tiddlers. I believe you can even pass a filter.

Also you can use a permalink even to open a non existent tiddler and add something to appear from the view template on missing tiddlers.

I would live to see more features Mario but quite a lot is already possible.

Tony

PMario

unread,
Dec 14, 2019, 5:45:44 AM12/14/19
to TiddlyWiki
Hi folks,

If you are interested in getting this PR merged, please +1 the comment: https://github.com/Jermolene/TiddlyWiki5/pull/4374#issuecomment-565705984

have fun
mario

PMario

unread,
Jun 6, 2021, 7:17:22 AM6/6/21
to TiddlyWiki
Hi Jan,
The discussion about my PR at: https://github.com/Jermolene/TiddlyWiki5/pull/4374 is active again. ... So is this fictionality still interesting for you?
-m

Reply all
Reply to author
Forward
0 new messages