Where do I find the list of CMSMS variables that are accessible to the template engine and what data they hold that I can access?
I have a number of things I need to be able to grab from the CMSMS like I need to know that "Parent" menu I am user regardless of the sub menus under it or sub menu I am in. I also need to know the current page content URL, not just the current URL to the root page, like if I am in a news page for cheese and its page 6, the URL information of what page I am on needs to be passed to the SWF file I have installed on the page.
I need to reliably gather the current page content, I have to currently use the $url =urlencode( "http://".$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] ); to reliably get the current URL, when I try
Code: Select all
global $gCms;
$hm =& $gCms->GetHierarchyManager();
$page_content_id = $gCms->variables['content_id'];
$curnode =& $hm->getNodeById($page_content_id);
$curcontent =& $curnode->GetContent();
$url = urlencode($curcontent->GetURL()); // url of current page
I am using {get_URL} as a UDT that spits out an encoded URL for a flash object, the URL requires the current page URL to function properly but I am not having much luck when I use the {current_page} plugin I made that is meant to do the same job.
What appears to happen is anything beyond the front page is not accessible to the flash item and the content defaults to the first page regardless of if I am on page 100 or page 10.
When I revert back to using the UDT and plain old PHP $_SERVER vars, it works on any page as its meant to work.
So can someone please assist with information on what variables I have access to and how I access that information.