vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB5 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=263)
-   -   Remove or Edit "Forum" link in breadcrumbs (https://vborg.vbsupport.ru/showthread.php?t=313030)

SiFor 07-17-2014 05:11 AM

Remove or Edit "Forum" link in breadcrumbs
 
How is it possible to Edit or Remove the "Forum" link in the breadcrumb links. I would rather it not be there or have it point to the root of the domain.

SiFor 07-18-2014 01:51 AM

Pointing the link to root would even be great.

SiFor 07-23-2014 03:17 AM

Anyone? So quite here.

Dead Eddie 07-23-2014 04:42 AM

The breadcrumbs are echo'd out in the header template. You should be able to work with a conditional to remove the breadcrumb if it's title (or phrase?) is Forum.

I'd help more, but my vb5 install is torched on the frontend.

Dave 07-23-2014 07:58 AM

I believe the location of this is in the navbar template all the way at the bottom.

SiFor 07-23-2014 09:57 AM

In vb 4 this was fairly simple for somebody like me with limited knowledge but in vb5 its a different story.

This looks to be the section in the header template:

HTML Code:

        <vb:if condition="$page['crumbs']">
                {vb:set breadcrumbSchema.itemprop, breadcrumb}
                <ul id="breadcrumbs" class="h-clearfix" {vb:schema {vb:raw breadcrumbSchema}}>
                        <li class="crumb ellipsis"><a class="crumb-link" href="{vb:raw baseurl}/">{vb:phrase home}</a></li>
                        <vb:each from="page.crumbs" value="crumb">
                                <vb:if condition="isset($crumb['phrase']) AND !empty($crumb['phrase'])">
                                        {vb:set crumbTitle, {vb:rawphrase {vb:raw crumb.phrase}}}
                                <vb:else />
                                        <vb:comment><!-- Since we don't want phrase placeholders to be escaped, we escape user titles here. --></vb:comment>
                                        {vb:set crumbTitle, {vb:raw crumb.title}}
                                </vb:if>
                                <li class="vb-icon separator"></li>
                                <li class="crumb ellipsis"><vb:if condition="$crumb['url']"><a class="crumb-link" href="{vb:raw baseurl}{vb:raw crumb.url}">{vb:raw crumbTitle}</a><vb:else />{vb:raw crumbTitle}</vb:if></li>
                        </vb:each>
                </ul>
        <vb:else />
                <vb:comment>
                        We still need the #breadcrumbs element (even though empty) to avoid having multiple CSS rules to deal with different scenarios
                        where adjacent elements - breadcrumbs, channel-subtabbar, notices, announcements are available, visible, hidden or empty.
                        Used div instead of ul to prevent having an empty ul which is invalid in XHTML 1.0 Strict (though valid in HTML5).
                        Though we are currently using HTML5 doctype, using an emtpy div will ensure that this will validate even if we change the doctype in the future.
                </vb:comment>
                <div id="breadcrumbs"></div>
        </vb:if>


Dave 07-23-2014 10:10 AM

Oh oops, didn't know this was posted in the vBulletin 5 section. My bad. c:

Dead Eddie 07-23-2014 11:41 AM

HTML Code:

<vb:if condition="isset($crumb['phrase']) AND !empty($crumb['phrase'])">
                                        {vb:set crumbTitle, {vb:rawphrase {vb:raw crumb.phrase}}}
                                <vb:else />

Ultimately, it's probably going to look something like this:
HTML Code:

<vb:if condition="isset($crumb['phrase']) AND !empty($crumb['phrase'])">
<vb:if condition="$crumb['phrase'] != 'forum'>                                       
{vb:set crumbTitle, {vb:rawphrase {vb:raw crumb.phrase}}}
</vb:if>
                                <vb:else />


SiFor 07-24-2014 08:11 AM

Thanks for the help but I get "Invalid Tag Nesting" when trying to use your code.

Dead Eddie 07-24-2014 11:13 PM

HTML Code:

                        <vb:each from="page.crumbs" value="crumb">
                                <vb:if condition="isset($crumb['phrase']) AND !empty($crumb['phrase'])">
                                <vb:if condition="$crumb['phrase'] != 'forum'">
                                        {vb:set crumbTitle, {vb:rawphrase {vb:raw crumb.phrase}}}
                                </vb:if>
                                <vb:else />

This didn't give me an error.

(Oops, I see I forgot a closing '"' up in #8)


All times are GMT. The time now is 05:29 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02571 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete