Navigating from a Modal?

89 views
Skip to first unread message

David Szego

unread,
Feb 2, 2017, 3:22:19 PM2/2/17
to TiddlyWikiDev
Hi all,

The Modal example in the TW5 web page shows a nested Modal being opened. It does this by transcluding "SampleWizard", which includes the button:

<$button message="tm-modal" param="SampleWizard2">nest wizards</$button>

This tells me that buttons and messages work in Modals, but I'm having trouble with tm-navigate.

What I'd like to do is fire a tm-navigate message, or an action-navigation event, in order to have a Modal with a button that lets me open a Tiddler.

However, this doesn't work when shown in a Modal:

<$button message="tm-navigate" navigateTo="SomeTiddler" >Open</$button>

nor does a
<$button><$action-navigate...>
combination.

So, is there a way to place a button in a Modal, which opens a new Tiddler in the Story?

(I'm guessing the Modal is outside the story...)

Thanks!
- David.

Tobias Beer

unread,
Feb 2, 2017, 4:07:39 PM2/2/17
to TiddlyWikiDev
Hi David,

You could simply use a plain link instead of a button... or maybe a link styled as a button if it should look like one.

Best wishes,

Tobias.

Mat

unread,
Feb 4, 2017, 10:59:52 AM2/4/17
to TiddlyWikiDev
David, I use a fake modal in #tw-admin based on pure css. I call it fake because I have never used the real modal so I must assume I have made it in another way.

It should be possible to put a button into this modal without any problems.

<:-)

Jeremy Ruston

unread,
Feb 4, 2017, 11:25:01 AM2/4/17
to tiddly...@googlegroups.com
Hi David

On 2 Feb 2017, at 20:22, David Szego <david...@gmail.com> wrote:

This tells me that buttons and messages work in Modals, but I'm having trouble with tm-navigate.

The tm-navigate message is handled by the <$navigator> widget, which isn’t included in the modal by default.

The workaround is to include an explicit navigator widget in your modal:

<$navigator story="$:/StoryList" history="$:/HistoryList”>

…modal stuff…

</$navigator>

Best wishes

Jeremy

David Szego

unread,
Feb 4, 2017, 6:25:46 PM2/4/17
to TiddlyWikiDev
Hi Jeremy,

Thanks for the tip. Unfortunately the whole string ( <$navigator story=... </$navigator> ) renders as text wherever I use it!

Jeremy Ruston

unread,
Feb 5, 2017, 9:24:18 AM2/5/17
to tiddly...@googlegroups.com
Hi David

Sorry, one of the double quotes got mangled by my email client. Try this:

<$navigator story="$:/StoryList" history="$:/HistoryList">
...
</$navigator>

Best wishes

Jeremy.

On 4 Feb 2017, at 23:25, David Szego <david...@gmail.com> wrote:

Hi Jeremy,

Thanks for the tip. Unfortunately the whole string ( <$navigator story=... </$navigator> ) renders as text wherever I use it!


--
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 tiddlywikide...@googlegroups.com.
To post to this group, send email to tiddly...@googlegroups.com.
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/a491d244-1944-43ef-970e-d168e0bc97ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Szego

unread,
Feb 5, 2017, 11:32:00 PM2/5/17
to TiddlyWikiDev
Thanks, Jeremy. I caught that, but still can't fire a button with a message within a navigator widget, in a modal. However, <$link> works (within a nav widget), so I've styled it and used that. You may want to look into it as a bug(?)

Cheers,
David.
Reply all
Reply to author
Forward
0 new messages