Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 19 Oct 2016, 03:19
hilaryl hilaryl is offline
 
Join Date: Jan 2006
[SOLVED] Count breadcrumbs in navbar_link

I am adding schema.org markup to the breadcrumbs in the 'navbar_link' template, and one attribute it requires is the breadcrumb position. So each breadcrumb will have:


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Where X is equal to the breadcrumb count.

The count needs to increment with each new breadcrumb.

The navbar_link template doesn't use a foreach statement, instead it's done through the functions.php file, so I can't seem to increment the number in the navbar_link template.

How can I increment a variable across the breadcrumbs?

--------------- Added 19 Oct 2016 at 05:11 ---------------

SOLVED

Turns out I'm a vBulletin master and solved this with logic!

There was already a $counter variable in the functions.php code, so I just created a plugin that hooked into the function, and then registered the $counter as a new variable.

Hook Location: navbits
Plugin PHP Code:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Then add {vb:raw breadcounter} into the navbar_link template.

Last edited by hilaryl; 19 Oct 2016 at 05:12.
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Post Count Modifier - Minimum Post Characters to Count towards Post Count Chris M vBulletin 2.x Full Releases 35 13 Oct 2003 19:29


Tags
breadcrumb, counter, increment


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:03.

Layout Options | Width: Wide Color: