How http://do/I/access/_THISPART_ ?

97 views
Skip to first unread message

Mat

unread,
Aug 3, 2019, 9:46:11 AM8/3/19
to TiddlyWiki

Non of the info commands seem to access the marked out part. How do it?

Capture.PNG


Thanks!

<:-)

Jeremy Ruston

unread,
Aug 3, 2019, 11:16:49 AM8/3/19
to tiddl...@googlegroups.com
Hi Mat

Non of the info commands seem to access the marked out part. How do it?

There’s no consensus but it’s often called the “location hash”, “fragment identifier” or “named anchor”. In any case, it is not currently exposed by the info mechanism because   it instead exposed through the navigation mechanism.

Best wishes

Jeremy.


<Capture.PNG>


Thanks!

<:-)


--
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/aff51d57-35ab-4092-b6c1-4f9962b99462%40googlegroups.com.
<Capture.PNG>

Mat

unread,
Aug 3, 2019, 11:32:17 AM8/3/19
to TiddlyWiki
Thanks. 

So how would I test if the url has the suffix "foo"?

I hope to do it at startup.

<:-)

Jeremy Ruston

unread,
Aug 3, 2019, 12:22:15 PM8/3/19
to tiddl...@googlegroups.com
So how would I test if the url has the suffix "foo”?

Just to check, in the example http://example.com/index.html#fragment are you talking about “fragment” or “index.html”, or something else?

If you are talking about fragment, then there’s no direct way to read it at the moment.

Best wishes

Jeremy


I hope to do it at startup.

<:-)

--
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.

Mat

unread,
Aug 3, 2019, 12:31:55 PM8/3/19
to TiddlyWiki
If you are talking about fragment, then there’s no direct way to read it at the moment.

Yes, the fragment (tiddler) - but if the whole url could be retrieved then I could do the slicing myself.

BTW, I initially used "$:/info/url/full" which caused some confusion because I assumed it really was the full url. Maybe it is misnamed? (Or maybe I don't know what the "full url" is).

<:-) 

Jeremy Ruston

unread,
Aug 3, 2019, 12:33:33 PM8/3/19
to tiddl...@googlegroups.com
Hi Mat

Yes, the fragment (tiddler) - but if the whole url could be retrieved then I could do the slicing myself.

BTW, I initially used "$:/info/url/full" which caused some confusion because I assumed it really was the full url. Maybe it is misnamed? (Or maybe I don't know what the "full url" is).

As I say, I don’t think it’s currently possible to read the fragment; it is not included in $:/info/url/full.

Best wishes

Jeremy



<:-) 

--
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.

Mat

unread,
Aug 3, 2019, 12:37:05 PM8/3/19
to TiddlyWiki
Then I know. Much appreciated that you replied.

<:-)

Arlen Beiler

unread,
Aug 3, 2019, 5:35:23 PM8/3/19
to TiddlyWiki
If you need to read the location hash for Javascript purposes, you could use a raw head tiddler with a script tag to save it in a global variable. Or put it in a tiddler in the preload array. 

On Sat, Aug 3, 2019 at 12:37 PM Mat <matia...@gmail.com> wrote:
Then I know. Much appreciated that you replied.

<:-)

--
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.

Mat

unread,
Aug 3, 2019, 6:11:25 PM8/3/19
to TiddlyWiki
Jeremy, Arlen and anyone - my question did have a familiar feel to it:


BJ has solved it!


<:-)

TonyM

unread,
Aug 3, 2019, 8:04:55 PM8/3/19
to TiddlyWiki
On a related issue

I was trying to get the filename.ext the wiki loaded from when using file://

Is there a way?

Regards
Tony

Jeremy Ruston

unread,
Aug 4, 2019, 7:10:46 AM8/4/19
to tiddl...@googlegroups.com
Hi Tony


On 4 Aug 2019, at 01:04, TonyM <anthony...@gmail.com> wrote:

I was trying to get the filename.ext the wiki loaded from when using file:// 

Is there a way?

Try something like:

[[$:/info/url/pathname]get[text]split[/]last[]]

Best wishes

Jeremy

TonyM

unread,
Aug 4, 2019, 8:24:05 AM8/4/19
to TiddlyWiki
Thanks Jeremy

I expected it was something like that. But at the time I asked, the filename was not even present in the info path. On top of timing I think.

I will ask more If I can reproduce it.

Regards
Tony

Reply all
Reply to author
Forward
0 new messages