Hello,
I was wondering if someone could help me out with a small question I have. I would like to remove the breadcrumb from the forum pages if at all possible. This may be a theme issue but I thought I would ask here first.
If I go to my theme specific settings, there is an option to turn off the breadcrumb on all pages. I would like to keep the breadcrumbs on all pages accept for the forum ones. The I had a look at the theme files page.tpl.php and in there I found this code:
<?php if ($breadcrumb): ?>
<div id="breadcrumb">
<?php print $breadcrumb; ?>
</div><!-- /breadcrumb -->
<?php endif; ?>
How would I add an extra condition stating "AND page in not Forum page" I have tried a few things but I am kinda new to Drupal and PHP so not sure how to grab the title/id/url of the current page. Any help would be greatly appreciated.
Also I am not sure if this matters but I am using URL aliases to make the url: http://www.example.com/forums
Thank you for this great module!
Comments
Comment #1
rkolech commentedIt seems I have found the solution to the issue. I will post it here in case anyone else would like to do the same thing.
I added some javascript to the header section of the page.tpl.php file of my theme.
This file can be found at: /drupal_root/sites/all/themes/*theme_folder*/page.tpl.php
Here is the code I added:
So basically it looks at the url and hides the breadcrumb if the url contains "/forums". In my case the url of my forums is: www.exampleDomain.com/forums. This will be different for others. The code should work regardless of what your domain is as it only looks at the path.
I have not really tested this too much yet, so it may not be bullet proof but so far it works well for me.