The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
[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:
Code:
<meta itemprop="position" content="X" /> 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 [DATE]1476853910[/DATE] at [TIME]1476853910[/TIME] --------------- 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: Code:
$breadcounter = $counter; vB_Template::preRegister('navbar_link', array('breadcounter' => $breadcounter)); |
#2
|
|||
|
|||
Teşekkür ederim bu açıklamadan faydalandım.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|