Current page in breadcrumbs as a link?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • M.Scheel
    Senior Member
    • Sep 2001
    • 482
    • 5.7.0

    [Forum] Current page in breadcrumbs as a link?

    Hi

    I am currently adding Microdata to my breadcrumbs so that they show up on Google as Breadcrumb navigation and not as plain URL.
    However to do that I need the current page to be a link as well and not plain text.

    I tried {vb:link thread, {vb:raw threadinfo}} and {vb:raw nav_url} and both don't work.

    How can I get the last Element of the breadcrumbs to be a link to the current page too?


    Helps is much appreciated

    StarBuG
    Michael Scheel
    Facharzt für Kinder- und Jugendmedizin

    Web: www.Kinderarzt-Cuxland.de
    Facebook: Kinderarzt.Cuxland
    Instagram: Kinderarzt.Cuxland
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    $thread is not available there, and unfortunately, it looks like the thread url is not even part of the array that is passed to the function. You are going to have to write a plugin or modify your code. The best place to ask for help with that is over on vbulletin.org, the modification site.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools <- awesome site for html/css help

    Comment

    • M.Scheel
      Senior Member
      • Sep 2001
      • 482
      • 5.7.0

      #3
      I made a request on vB.org: http://www.vbulletin.org/forum/showthread.php?t=284221

      I am not a programmer so writing a plugin is a bit out of my league.
      Can you help me with that please

      I looked into the construct_navbits function but it does not make much sense to me why lastelement does not have the $nav_url variable attached
      Michael Scheel
      Facharzt für Kinder- und Jugendmedizin

      Web: www.Kinderarzt-Cuxland.de
      Facebook: Kinderarzt.Cuxland
      Instagram: Kinderarzt.Cuxland

      Comment

      • oldz442
        Senior Member
        • Apr 2012
        • 318

        #4
        Old thread, but replying anyway.

        Use {vb:raw relpath} to get the current URL, and add it in navbar_link with an ahref around the text.

        My navbar_link looks like the below (I am using that xenforo type look though)
        PHP Code:
        <vb:if condition="$show['breadcrumb']">
          <
        span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
            <
        a href="{vb:raw nav_url}" class="crumb" rel="up" itemprop="url"><span itemprop="title">{vb:raw nav_title}</span></a>
            <
        span class="arrow">
              <
        span>&gt;</span>
            </
        span>
          </
        span>
        <
        vb:else />
          <
        span class="crust" itemscope="itemscope" itemtype="http://data-vocabulary.org/Breadcrumb">
            <
        a href="{vb:raw relpath}"><class="lastcrumb"><span itemprop="title">{vb:raw nav_title}</span></b></a>
          </
        span>
        </
        vb:if> 
        ΜΟΛΩΝ ΛΑΒΕ

        Comment

        Related Topics

        Collapse

        Working...