Not logged in. · Lost password · Register
Forum: General Help and Support Plugins RSS
Automated links to existing pages
Avatar
Peter12 #1
Member since Nov 2013 · 10 posts
Group memberships: Members
Show profile · Link to this post
Subject: Automated links to existing pages
Hello,

I am looking for a plugin which converts words with a page's title into a link to this page.

For example I have page with the title: "MacBook".
Just on another page (don't matter what title) has text about Apple products. There is a sentence like: "I love my new MacBook".
So I need a plugin the converts the word "MacBook" as an internal link to the page "MacBook".

I hope you just understand me.
Do you know what plugin I could use?

Thanks
Avatar
dokufan66 #2
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
That's actually a good suggestion, at least to a point.

I have see other Wiki's like veryquickwiki that automatically link CamelCase terms.

What I haven't seen is any going OCD and converting all terms that have an article into a link. Having spaces in page names will wreak havoc on any attempts.

I don't know if a plug-in for this already exists.
Avatar
turnermm (Moderator) #3
Member since Oct 2009 · 4724 posts · Location: Canada
Group memberships: Global Moderators, Members, Super Mods
Show profile · Link to this post
In reply to post #1
You can do this with the TexInsert plugin

Create an HTML macro with parameters, such as this, for instance:

internalLink_HTML    <a href="/ckedit/doku.php?id=%1" class="wikilink1">%2</a>

The first parameter is the dokuwiki page id, the second is the text which you want to display for the link.  Then in your page you would use the following markup:

#@macbook_HTML~macs:macbook,macbook~@#

This will give you a valid internal link.
Myron Turner
github: https://github.com/turnermm
plugins, templates: http://www.mturner.org/devel
Avatar
Michitux #4
Member since Apr 2008 · 377 posts · Location: Karlsruhe, Germany
Group memberships: Members, Wiki Managers
Show profile · Link to this post
In reply to post #2
Quote by dokufan66 on 2013-11-21, 16:46:
I have see other Wiki's like veryquickwiki that automatically link CamelCase terms.

DokuWiki does that, too, if you enable the camelcase configuration option.

I don't think that there is a plugin for automatically linking all words for which pages with that name exist. The problem might also be which namespace the plugin should use. However that could be solved by providing a configuration option that takes a list of namespaces in which the pages should be searched. I think this could be especially interesting for wikis that contain some kind of glossary for explaining technical terms. As I like the idea of the plugin I've just started an experiment and created a fundraiser for a plugin that should exactly be what you are looking for. Feel free to pledge some money if you want to support it - I'm really interested if that model works for funding DokuWiki plugin development.
Did you like my help or work for DokuWiki (plugins)? Consider giving something back.
Avatar
Peter12 #5
Member since Nov 2013 · 10 posts
Group memberships: Members
Show profile · Link to this post
Hello,

in our case we are not working with namespaces because we just have about 100 different pages.
Will there be an possibility for this model?

Thanks for an answer
Avatar
Michitux #6
Member since Apr 2008 · 377 posts · Location: Karlsruhe, Germany
Group memberships: Members, Wiki Managers
Show profile · Link to this post
Quote by Peter12:
in our case we are not working with namespaces because we just have about 100 different pages.
Will there be an possibility for this model?

That's actually no problem at all and will actually be the default behavior if no namespaces are configured and after all the root namespace is also a namespace that can be included in the list. I just thought that some people might want to limit the choice of pages to a certain sub-namespace. Without the namespace restriction the plugin would actually be even simpler. I've updated the description in order to clarify this.

Note that for words that are spelled as camelcase (like MacBook) no plugin is needed, you just need to enabled the camelcase configuration option and these words will become links automatically.
Did you like my help or work for DokuWiki (plugins)? Consider giving something back.
Avatar
Peter12 #7
Member since Nov 2013 · 10 posts
Group memberships: Members
Show profile · Link to this post
I already used the camel case but that's not exactly what I am looking for.

Thanks for your fast answer.
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-11-17, 12:24:36 (UTC +01:00)