I've been doing a couple of projects with the Concrete5 CMS recently and it's a joy to use! The template I implemented was designed for the iPad (more on that in another post) so one of the UI elements I wanted to include in the template was a Back button in the header. This would provide an easy way for the user to navigate out of sub-pages within the site.
I sought a little guidance at first and found some good advice in adding breadcrumb navigation in a Concrete5 site.
First of all, add the following lines at the top of your template default.php file right below the defined() function:
$page = Page::getByID($c->getCollectionParentID());
$parent_url = View::URL($page->getCollectionPath());
$nh=Loader::helper('navigation');
$breadcrumb = $nh->getTrailToCollection($c);
Then add the following lines in the place where you want your back button to appear.
if (count($breadcrumb)>0) {
echo 'Back';
}This code should show a back button whenever you navigate past the home page of the site.
Adding a Back Button to Concrete5 Template
Remove odd characters from PDF prints in VB.NET
Drag and Drop File Upload with HTML5 and Plupload
Signing Amazon Requests with PHP
The Sciptaculous Autocompleter Disappears in IE!
Coding [6]
coding .net [1]
coding concrete5 [1]
coding php javascript mysql [0]
ExtJS [1]
Family [1]
Flash [2]
Free Stuff [2]
JavaScript [3]
News [1]
Reviews [0]
Reviews Coding [0]
Webusiness [3]
August 2011 [3]
September 2009 [1]
June 2009 [1]
November 2008 [1]
October 2008 [3]
September 2008 [1]
March 2006 [3]