Is it possible to show breadcrumbs based on the URL. For example if the user hits example.com it means home->test1->test and if user hits example1.com it means home->test2->test. Is it possible to control the breadcrumbs visibility. Any one guide me how to do this.
Is it possible to show breadcrumbs based on the URL. For example if the
Share
A very nice implementation of A very customizable breadcrumb can be found in the Zen theme. If you already use a sub-theme of Zen then you’re in luck. You;ll only probably have to configure it and you’re good to go.
Options for the breadcrumb: each theme has it’s own settings. So you’ll need to add the options you’ll want for youre breadcrumb (On/Off, separator, home link On/Off etc.) in a
themes/your_theme_name/theme-settings.phpfile. Here you’ll find a starting point. For inspiration check out thetheme-settings.php(for defining the options) andzen.infofile (for providing the default values for the options).Theme the breadcrumb: then you’ll have to implement
your_theme_name_breadcrumbfunction intemplate.php. Again look in the file with the same name in the Zen theme for an example.Showing the breadcrumb: last step is to make sure that your breadcrumb is visible and you do this by printing the
$breadcrumbvariable. Look in thepage.tpl.php filetemplate for the default implementation and customize it as you like.Some other points of interests:
And don’t forget to clear the theme cache at the end 🙂