Navigation helper
Permalink Browser Info Environment
Hi
I believe I found, and fixed, an error with regard to External pages in the site tree. The problem is when the external link has a subpage e.g.http://www.domain.com/subpage, that the helper override strips anything after the main url. The fix was simple - check whether the cObj is an external link, if not, proceed with the rest of the helper, otherwise just return the url.
cheers
I believe I found, and fixed, an error with regard to External pages in the site tree. The problem is when the external link has a subpage e.g.http://www.domain.com/subpage, that the helper override strips anything after the main url. The fix was simple - check whether the cObj is an external link, if not, proceed with the rest of the helper, otherwise just return the url.
<?php defined('C5_EXECUTE') or die("Access Denied."); class NavigationHelper extends Concrete5_Helper_Navigation { public function getLinkToCollection(&$cObj, $appendBaseURL = false, $ignoreUrlRewriting = false) { $url = parent::getLinkToCollection($cObj, $appendBaseURL, $ignoreUrlRewriting); Loader::model("mapping", "multiple_domains"); $map = MultipleDomainsMapping::getByCurrentDomain(); if(!$cObj->cPointerExternalLink) { if (is_object($map) && is_object($p = $map->getMappedPage())) { if ($p->getCollectionID() > 0) { // Replace the first occurrence of the sub-domain URL $url = preg_replace('#' . $p->getCollectionPath() . '#', "", $url); } } $find = DISPATCHER_FILENAME . "/";
Viewing 15 lines of 23 lines. View entire code block.
cheers
Type: | Discussion |
---|---|
Status: | Legacy: Invalid |
https://www.concrete5.org/marketplace/addons/multiple-domains/suppor...