[dokuwiki] Re: code to display real/raw wiki page name
- From: Michael Klier <chi@xxxxxxxxxxx>
- To: dokuwiki@xxxxxxxxxxxxx
- Date: Wed, 26 Sep 2007 23:29:38 +0200
Ryan Jacobs wrote:
> Hello!
>
> I'd like to place some code that will display the real wiki pagename (in
> "namespace:pagename" format) in the footer of my template (main.php).
> The default template does this (in the header) with:
>
> <?php tpl_link(wl($ID,'do=backlink'),tpl_pagetitle($ID,true))?>
>
> The problem is that if you use the "Use first heading for pagenames"
> options, this will render the first heading, and not the actual wiki
> pagename that one would use when creating a link to that page.
>
> Basically, I'd like to provide an easy way for "rookie" editors (who
> just want to make edits to individual pages and not learn the insides of
> the wiki structure and namespaces) to cut-and-paste the wiki pagename
> that they would use to define a link to a the page they are viewing.
>
> I know that one could extract this info from the URL, but if you use the
> URL "/" namespace separator option, have a really long string of
> namespaces in the URL, or are viewing a "permanent-link" version, this
> can be quite confusing.
>
> Perhaps there is a small mod to the code example above that will do what
> I need?
>
> Any info greatly appreciated!
Hi,
I think the following should suffice:
<?php print $ID?>
If you like to have a link use this one:
<?php tpl_link(wl($ID,'',$ID)) ?>
HTH,
Chi
--
Michael Klier
mail: chi@xxxxxxxxxxx
www: http://www.chimeric.de
icq: 206179334
jabber: chi@xxxxxxxxxxxxxxxxxx
key: http://downloads.chimeric.de/chi.asc
key-id: 0x8308F551
- Follow-Ups:
- [dokuwiki] Re: code to display real/raw wiki page name
- From: Ryan Jacobs
- References:
- [dokuwiki] code to display real/raw wiki page name
- From: Ryan Jacobs
Other related posts:
- » [dokuwiki] code to display real/raw wiki page name
- » [dokuwiki] Re: code to display real/raw wiki page name
- » [dokuwiki] Re: code to display real/raw wiki page name
- [dokuwiki] Re: code to display real/raw wiki page name
- From: Ryan Jacobs
- [dokuwiki] code to display real/raw wiki page name
- From: Ryan Jacobs