|
|
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 |
|
|
|
|
|
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! |
|
|
|
|
|
|
| |
|
|
Code Placement | October 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 | |
|
|
|
| |
|
|
| 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. |
|
|
|
|
|
|
| |
|
|
Global variables | October 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! |
|
|
|
|
|
|
|
|
|
| MEMBERS
|
|
|