Commit 84b40ac6 authored by Tim Steiner's avatar Tim Steiner
Browse files

Adding loginPath and logoutPath as layout options.

parent 9c851a99
......@@ -18,6 +18,8 @@ class Unl_View_Helper_WdnTemplate extends Zend_View_Helper_Abstract
* contactInfo: HTML that will be placed in "Contact Us".
* footerContent: HTML that will be placed in the footer.
* googleAnalyticsId: A Google Analytics ID that will be used to track your site.
* loginPath: The path to the login action, with a leading slash.
* logoutPath: The path to the logout action, with a leading slash.
*
* @return string
*/
......@@ -120,12 +122,10 @@ class Unl_View_Helper_WdnTemplate extends Zend_View_Helper_Abstract
EOF;
$template->footercontent = $layout->footerContent . PHP_EOL . <<<EOF
<script type="text/javascript">
WDN.idm.setLogoutURL('$baseUrl/user/logout');
WDN.idm.setLoginURL('$baseUrl/user/login');
EOF;
$template->footercontent = $layout->footerContent . PHP_EOL
. '<script type="text/javascript">' . PHP_EOL
. (isset($layout->loginPath) ? "WDN.idm.setLoginURL('{$baseUrl}{$layout->loginPath}');" . PHP_EOL : '')
. (isset($layout->logoutPath) ? "WDN.idm.setLogoutURL('{$baseUrl}{$layout->logoutPath}');" . PHP_EOL : '');
if ($layout->googleAnalyticsId) {
$gaId = $layout->googleAnalyticsId;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment