Permalink
Browse files

Added option namespacename.

  • Loading branch information...
1 parent a47fd57 commit c1749a791cf9887642cdb727a80a34cf79749ab4 @mld mld committed Mar 31, 2011
Showing with 16 additions and 3 deletions.
  1. +4 −1 README
  2. +1 −1 VERSION
  3. +11 −1 syntax.php
View
5 README
@@ -6,7 +6,10 @@ All documentation for the Dir Plugin is available online at:
This plugin requires DokuWiki 2007-06-26 or later.
+This version of Dir Plugin is modified to accept the argument namespacename
+to show the namespaces name instead of just "start".
+
There's a Google Groups mailing list to discuss all issues:
http://groups.google.com/group/dokuwiki-plugin-dir (outdated)
-GPL 2 License
+GPL 2 License
View
@@ -1 +1 @@
-0.5
+0.5a
View
@@ -362,6 +362,7 @@ function _initOpts ($flags) {
$this->opts ["noheader"] = false ;
$this->opts ["collapse"] = false ;
$this->opts ["ego"] = false ;
+ $this->opts ["namespacename"] = false ;
$flags = split ('\&', $flags) ;
@@ -411,6 +412,10 @@ function _initOpts ($flags) {
case "list":
$this->style = "list" ;
break ;
+ case "namespacename":
+ $key = "namespacename" ;
+ $val = true ;
+ break ;
case "debug":
$this->debug = true ;
}
@@ -945,8 +950,13 @@ function _tableCellContentID (&$page) {
$pageid = $fqid ;
$name = NULL ;
- if ($page ["type"] == 'd')
+ if ($page ["type"] == 'd') {
+ if($this->opts ["namespacename"]) {
+ $pieces = explode(':',trim($pageid,':'));
+ $name = array_pop($pieces);
+ }
$pageid .= ':' . $this->start ;
+ }
if (! $this->useDefaultTitle) {
$name = split (':', $fqid) ;

0 comments on commit c1749a7

Please sign in to comment.