, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Bread Crumb Links

FlexCMS Support Forum


Bread Crumb Links
Started October 3, 2008 @ 9:13am by Grady
Post Message 
Grady


Posts: 25
 
Bread Crumb LinksOctober 3, 2008 @ 9:13am
How would I go about getting the bread crumb links at the top of the page (e.g., Home > Available Sites) located at the top of page http://www.interstate22alliance.com...ndex.php/pages/Available-Sites.html to show "Home > Available Sites > City of Fayette Industrial Park" at the top of the page http://www.interstate22alliance.com...City_of_Fayette_Industrial_Par.html so that my users can go back to the page they originally clicked away from?
 

Last Edit: October 3, 2008 @ 9:16am by Grady
DCSun
Administrator



Posts: 625
 
October 3, 2008 @ 7:36pm
You can use the $LocationBar variable to overwrite the default FlexCMS navigation links.

For example you might do:
Code

$LocationBar = '<a href="'.$BaseURL.'">Home</a> > <a href="'.$MainURL.'/pages/mypage.html">Page Above</a> > This Page';


And of course that's PHP code so the page would need to be enabled as such.


David


FlexCMS v3.2 Has Been Released!
 
Grady


Posts: 25
 
Code PlacementOctober 4, 2008 @ 9:09am
Where would I place the code you suggest? I placed it in the Custom Page Contents block and enabled PHP processing, but I received an error. I placed it in the template.php and nothing changed.

I get the following error when I place the code i tyhe Custom Page Contents block and enable PHP processing:
Parse error: syntax error, unexpected '<' in /home/i22al/public_html/index.php(1736) : eval()'d code on line 2

Thank you, Grady
 

Last Edit: October 4, 2008 @ 9:14am by Grady
Grady


Posts: 25
 
October 4, 2008 @ 9:30am
The code works when php is enabled and the code is placed in Custom Page Contents block as long as everything else (i.e., all of my content) is removed.
 
Grady


Posts: 25
 
Global variablesOctober 4, 2008 @ 10:06am
Are there any global variables that could be used in the template.php page to make all pages have bread crumbs?
 
DCSun
Administrator



Posts: 625
 
October 4, 2008 @ 12:32pm
Unfortunately there's no easy way to make the breadcrumbs appear any differently than they do now, because FlexCMS doesn't know how the pages are arranged. It's something we'd like to get in a future version, but it's a complicated problem.

Regarding your error, that's probably because you mixed PHP and HTML in the same page, and the HTML caused problems when it tried to interpret that as PHP code. You'll need to leave the page PHP enabled to make the $LocationBar part work, but you can turn PHP off for the rest of it or just certain parts of it, to use regular HTML. You do that by placing ?> at the start and <? at the end, such as this:
Code

$LocationBar = '<a href="'.$BaseURL.'">Home</a> > <a href="'.$MainURL.'/pages/mypage.html">Page Above</a> > This Page';

/*
everything outside the PHP control tags is still processed as PHP
*/

?>

<!-- any HTML code you want goes here -->

<?

/*
this is now PHP again in this section, but it could be right at the end, there doesn't need to be anything in here.
*/



There's also no requirement to have those comments of mine, I just added them to illustrate what happens in those places. All you need is the ?> and <? tags around your HTML and you're all set. You could also have them in there more than once if you needed PHP to happen in between sections of HTML.


David


FlexCMS v3.2 Has Been Released!
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.12971 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS