Page Link Action
What
- Wiki Page Link action
- Only shows link if current user as read access to page
- Why show the link if they can't read it
Use
- {{pagelink page="WikiName" title="Display Title"}}
- Remember, it only shows up if user can read WikiName page
Installation
- Copy code into pagelink.php action.
Code
<?php
if(is_array($vars) AND $vars <> array() ){
if(isset($vars['title'])){
$title = $vars['title'];
}
if(isset($vars['page'])) {
$page = $vars['page'];
}
}
if($this->HasAccess("read", $page)) {
if(!isset($title)) $title = $page;
$link = '[[' | . $page . ' ' . $title . ']]';
print $this->Format($link);
}
if(is_array($vars) AND $vars <> array() ){
if(isset($vars['title'])){
$title = $vars['title'];
}
if(isset($vars['page'])) {
$page = $vars['page'];
}
}
if($this->HasAccess("read", $page)) {
if(!isset($title)) $title = $page;
$link = '[[' | . $page . ' ' . $title . ']]';
print $this->Format($link);
}
To Do
- Put some comments in it (I wrote it too fast)
CategoryUserContributions