This discussion was created from comments split from:
Adding Page and Breadcrumb.
There are several other threads about breadcrumbs on the forums, but they haven't been answered. Rather than kicking an old topic (8 months!), it's better to start a new one and let's hope someone has an answer this time.
0 • •
Comments
I need this as well. :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@Turbolego : Howcome you're bumping a thread that's almost 8 months old?
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@UnderDog: I figured it would be better to continue on an unanswered thread rather than making a new one about the same issue.
- Spam
- Abuse
- Troll
3 • Off Topic Insightful 3Awesome LOL •I'll split it from the old one. I don't know if it's in the etiquette thread, but kicking an ancient topic could be one of the items. It's not breaking etiquette (like hijacking topics for example), it's just frowned upon. I frowned, therefore I split :-) I'll look in the code for your breadcrumbs until someone has an answer.
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •There's a
echo Gdn_Theme::Breadcrumbs()function or{breadcrumbs}smarty tag. Try putting either one in your default.master.- Spam
- Abuse
- Troll
2 • Off Topic Insightful 2Awesome LOL •@Todd: I guess you meant
default.master.tpl??? or is itdefault.master.php???- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@badlearner
Depends which theme you are using.
AfaIk, if you have a .tpl you would use the smarty tag.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Okay, got it. Thanks @whu606
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I have tried, but am unable to figure it out. There's no
default.master.tplin my themeor in
/vanilla-root-directory/applications/dashboard/views/.Besides I don't know how to code, and definitely not PHP. It would be nice if someone who knows how to add breadcrumbs can provide some proper code.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@badlearner
'proper code'?
You've been given all the help you need to manage this.
People have gone out of their way to provide you with the code you need, and instructions how to use it.
If you don't have a custom theme then that's your issue.
Changes like this are much better made in custom themes rather than tampering with the core.
Follow the instructions here: http://vanillaforums.org/docs/themequickstart to create a custom theme folder you can then work in.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@whu606 : I am on my way into creating a basic custom theme. By proper code I only meant something like below that could be placed in a theme file:
<?php echo Gdn_Theme::Breadcrumbs() ?>(this doesn't work)I wasn't demanding, nor was I rude. Your tone could be better. :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •So could yours - if you didn't meant to be demanding then perhaps you could take greater care in how you phrase things?
Given that Todd is one of the creators of Vanilla, I think it likely that what he has given you is the 'proper code'.
In your theme folder you should have a Views folder.
In there should be a default.master file either .php or .tpl
Which do you have?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •I don't understand how you found my request demanding. Anyway, understanding is subjective, so let's set that aside. :)
Now, what do you mean by 'theme folder'? Are you referring to '/themes/default/' directory? Then, no, there's no 'views' inside that. The only directory inside is 'design'. And since my custom theme is actually a copy of '/themes/default/' it also has only the 'design' folder.
There's no default.master.php or default.master.tpl inside the 'views' folder in '/applications/vanilla/views/' either. But I found default.master.php in '/applications/dashboard/views/' folder.
So, I created a folder named 'views' inside my custom theme, and copied the default.master.php from '/applications/dashboard/views/' to it. And now, my theme does have a default.master.php file.
What should I do now?
(I tried to make this explanative so that anyone coming here with the same doubts in mind can understand.)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@badlearner - OK - sorry if I got tetchy.
Edit your themes default.master by adding this
directly after the
<div id="Body">tag.That worked for me on my test site just now.
By adding the div tag you can give it a class, and then set rules in your custom.css file for that class to style it the way you want.
Remember to change the About.php file to give your theme a name, so that you can select it in the dashboard.
The custom.css file only needs to contain any rules you want to add or change.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •Got it. Thanks!
Done!
I added it. But nothing shows up. I am still checking...
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@whu606 : Okay, i should have done better — I was editing admin.master.php instead of default.master.php file. DAMN!
Anyway, the breadcrumb still doesn't seem to work. All I see is a link to 'Home'. On every page, it's just the same. Am I missing something?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@badlearner - tbh I don't use it myself.
The 'Home' link showing up means that the 'Breadcrumbs' are being called up (inspecting with Firebug shows it is part of the span class 'Breadcrumbs'), but how it is meant to work after that I don't know.
If no one gives you an answer here, it may be worth starting a new question asking about how it is meant to work, and if there are any settings for it.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Will do that. Thanks for the help so far. :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •