Permalink
Browse files

Adds direct link to key page creation from CaMykS.

  • Loading branch information...
JB Lebrun
JB Lebrun committed Mar 12, 2018
1 parent 73e1495 commit 8bafb52d4aee97bdd5d32ac96d639704d4a4b300
Showing with 35 additions and 3 deletions.
  1. +13 −3 Camyks.php.inc
  2. +22 −0 plugin/module/Admin_ContentPage/Admin_ContentPage.php.inc
@@ -1927,15 +1927,25 @@ final class Camyks {
/*
* return site mode link based on current one
* @param mixed $page
* @param string $name
* @param string $lg
* @param array $params
* @return string
* @access public
*/
public function get_siteCurrentLink($lg='', $params=null) {
return $this->get_siteLink ($this->contentPage->id, $this->contentPage->name, $lg, $params!=null?$params:$this->contentPage->params);
return $this->get_siteLink($this->contentPage->id, $this->contentPage->name, $lg, $params!=null?$params:$this->contentPage->params);
}
/*
* return site mode link to key page
* @param string $key
* @param string $lg
* @param array $params
* @return string
* @access public
*/
public function get_siteKeypageLink($key='', $lg='', $params=null) {
return $this->modules['Admin_ContentPage']->get_siteKeyPageLink($key, $lg, $params);
}
/*
@@ -965,6 +965,28 @@ class Admin_ContentPage extends Module {
return '';
}
/*
* return key page link
* @param string $key
* @param string $lg
* @param array $param
* @return string
* @access public
*/
public function get_siteKeyPageLink($key='', $lg='', $params=array()) {
/* no page, no link */
if ($key == '')
return '';
/* load page from key */
$page = $this->get_keyPage($key);
if ($page == false)
return '';
/* return site page link */
return $this->get_sitePageLink($page, $lg, $params);
}
/*
* return homepage link
* @return string

0 comments on commit 8bafb52

Please sign in to comment.