PDA

View Full Version : Friendly url


Lionel
06-13-2014, 08:37 PM
Hi,

how can I get the friendly url for a cms article link?
fetch_seo_url('cms', $nodeid);

does not work for me?

Dead Eddie
06-14-2014, 04:44 AM
Here's how the URL is generated within the CMS:

$segments = array('node' => vBCms_Item_Content::buildUrlSegment($this->content->getNodeId(), $this->content->getUrl()), 'action' =>'view');
$view->page_url = vBCms_Route_Content::getURL($segments, ($this->parameters['page'] > 1 ? array($this->parameters['page']) : array()));

Lionel
06-14-2014, 05:04 AM
thanks, I did it a different way

$nodeid = $program['nodeid'];

$link = $vbulletin->options[homeurl] . '/' . $vbulletin->options['site_tab_url'];


$nodeurl = $link. '?' . $nodeid . ($program['nodeurl'] ? '-'. $program['nodeurl'] : '');