Not logged in. · Lost password · Register
Forum: General Help and Support Plugins Plugin Wishlist RSS
Use tag as URL shortcut
Want to be able to tag a page with an ID that afterwards can be used as a URL to that page.
Avatar
khun #1
Member since Dec 2014 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: Use tag as URL shortcut
Hi!

I want to be able to tag a DokuWiki page with e.g.:

#URLTAG ID_MY_TOPIC

as the first line of the page. This should not show up in the page, but afterwards, I should be able to use:

http://www.mydokuwiki.com/doku.php?id=shortcuts:ID_MY_TOPIC

as a URL to the tagged page. The address shown should be the address of the page, not of shortcuts:ID_MY_TOPIC.

I can get close to this functionality with the "redirect", "shorturl" and maybe some more plugins, but I can't find any that works completely as I want.

The point about doing it like this is:

- We have a user interface with toolbar buttons. Each has a unique ID in the form of a string like ID_MY_TOPIC. When the user hovers the mouse over a button and presses F1, I want the help page in DokuWiki for that button to open.
- We don't want an ini file with the installation of our program, linking IDs to wiki pages, because it's too static. Sometimes a button doesn't have a help page when we ship the program, but we want it available for the users as soon as it is created.
- We might want to change the structure of the help pages, without braking the functionality for users.
- We could use a redirect file in the dokuwiki with an existing plugin. But that means lots of people editing one specific file linking IDs to URLs. And you wouldn't see it directly on each page.

We think using a tag on each page is a lot more practical for the editors of the DokuWiki.

Any ideas appreciated!
Avatar
turnermm (Moderator) #2
Member since Oct 2009 · 4689 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
as the first line of the page. This should not show up in the page, but afterwards, I should be able to use:

http://www.mydokuwiki.com/doku.php?id=shortcuts:ID_MY_TOPIC

as a URL to the tagged page. The address shown should be the address of the page, not of shortcuts:ID_MY_TOPIC.
This isn't very clear to me. Is there a contradiction here?  Is not the page id the address?  By 'shown' you aren't talking about something like nice urls? So do you mean something like a key/value arrangement where each button represents a key which identifies a page?  If so, then why would the dokuwiki page need an embedded tag?  Wouldn't the button do the job without a tag in the page? 

If you want to use redirection, you could possibly use the anchor plugin.  Create a default page in which you list the anchors, all of which have names of the pageids which you want to link to.  Then use redirection to redirect the access to the page named by the anchor.  Just doing a quick check on the mod _rewrite docs, I see you can write a condition which checks for the file.  If it doesn't exist the url would be processed as is and point to the anchor on the default page.

Edit
I played around a bit with the hash, and it doesn't seem to be workable.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
This post was edited on 2014-12-18, 15:46 by turnermm.
Avatar
khun #3
Member since Dec 2014 · 2 posts
Group memberships: Members
Show profile · Link to this post
Hm, Ok, seems I wasn't clear enough, I'll try again...

But thanks for looking into it!

Let's simplify by saying the button IDs are outside my control. We are lot's of people editing help pages. We want to be able to match a button's ID to any one help page in our DokuWiki.

We _could_ do this as you suggest with redirections. Either by using a redirection file matching IDs to pages or by having one specific area with lots of pages named ID_... simply redirecting this page to the one we want.

The drawback here is maintenance. To edit a page with a redirection command like:

#REDIRECT [[tothispage]]

you can't go to that page and press "Edit this page", since you are automatically redirected somewhere else. So you have to edit the address in the browser, adding "?do=edit" or something like that. Which is not user friendly enough for our editors.

Also, while editing a page somewhere in the page hierarchy and then having to go a totally different place to tell which ID should open this button page, is a little awkward.

Another detail is that the redirections I've tried, all show the URL of the originally specified address (with the ID), not the address of the page you are actually showing. We want the redirection to be "invisible" for the user.

We therefore wish to be able to put a tag on the page we are editing, telling which button ID (or even IDs) should link to this page.

Hope this was clearer?
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-08-22, 03:16:52 (UTC +02:00)