Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Breadcrumbs
stapler2025
New
Hi All,
I have my site pretty much the way I want it, but I'm having a slight issue modifying the breadcrumbs. I've edited them so that they display the page/thread title, but when someone goes to edit their post, or something else that would already generate a breadcrumb, it's showing "Home › General › Edit Discussion › Edit Discussion"
Is there a way to remove the first Edit Discussion, since it's already listed there where I put it manually?
0
Comments
Welcome to the community!
What version of Vanilla are you running?
How did you implement your current breadcrumb modification?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
precisely what i thought.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Sorry for the delayed reply!
{breadcrumbs} <span class="Breadcrumbs" itemscope="" itemtype="http://data-vocabulary.org/Breadcrumb"><span class="Crumb"> › </span><span itemprop="title">{$Title}</span></span>
is what I'm using in default.master.tpl to achieve what I want, hackey I know.We're running on the latest version off the GitHub.
and we say again what version is that? It's not that hard to put a number in, provided you want help.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Apologies. We're running v2.2
Breadcrumbs are wildly diverse in Vanilla.
You could use a theme hook to add the page title as the last breadcrumb only if it would be different.
Something like:
If you use this, you should remove your previous modification to the default.master.tpl file.
{breadcrumbs}
is all that is needed.Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
See above. I forgot I can edit posts by clicking on the gear icon that appears when hovering over a post and selecting Edit.
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@hgtonight
I got to the themehooks part but never coded anything , but i was thinking of removing based on post controller or adding if not post controller, but I I like yours better.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Tossed that in and it just made Vanilla start throwing a 500 error
+1 for the try though, I appreciate it! I've never used theme hooks, and not even close to a coder, lol.
in your tpl file - this will print normal breadcrumbs with title you wanted and will not print duplicates of edit discussions. So based on what you said - I believe this is what you want
@stapler2025
but you didn't mention the problem duplicates everywhere - not just edit discussion, it duplicates categories too.
So hgtonight's solution is better.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
try this @stapler2025
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I tested it working on 2.1b1, but could you post the full error?
Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
hey @hgtonight
what do you thin about --
http://vanillaforums.org/discussion/comment/187964/#Comment_187964
too restrictive?? it works though - he didn't have a working link before in the title, it seems overkill anyway.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
First error was
[19-Jul-2013 02:13:25 UTC] PHP Parse error: syntax error, unexpected T_PUBLIC in /home/lsvps/public_html/vanilla/themes/default/class.defaultthemehooks.php on line 2
so I addedclass DefaultThemeHooks implements Gdn_IPlugin {
Now I'm getting
[19-Jul-2013 02:14:00 UTC] PHP Parse error: syntax error, unexpected $end, expecting T_FUNCTION in /home/lsvps/public_html/vanilla/themes/default/class.defaultthemehooks.php on line 12
Thanks for your guys help
@peregrine - what it's doing with how I have it setup using the title smarty tag, is anything that would already be in the breadcrumb bar, is basically duplicated. So if you're viewing a specific category, it lists Home - CategoryName - CategoryName, or starting a new discussion does Home - New Discussion - New Discussion, etc.
Those errors indicate your theme hooks file is not set up correctly.
Mind posting the contents of your
class.defaultthemehooks.php
file?Search first
Check out the Documentation! We are always looking for new content and pull requests.
Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.
@stapler2025
you may chose to use @hgtonight's solution in the long run.
but doesn't the change i posted in relation to you tpl file work
http://vanillaforums.org/discussion/comment/187964/#Comment_187964
it doesn't duplicate anything as far as I can see
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Suuuuuuuper late reply, been busy.
If I'm reading your's right, all it looks for is Edit Discussion, doesn't it?
no , not true.
all I can say is, try it. it worked for me. and if it doesn't work for you tell me exactly what doesn't work.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
come back in a couple of weeks .
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.