vBulletin ModsThe Official vBulletin Modifications Site
https://www.vbulletin.org/forum/showthread.php?t=323652 |
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:
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:
Then add {vb:raw breadcounter} into the navbar_link template. |
Teşekkür ederim bu açıklamadan faydalandım.
|
All times are GMT. The time now is 06:32. |
Powered by vBulletin® Version 3.8.14
Copyright © 2022, MH Sub I, LLC dba vBulletin. All Rights Reserved. vBulletin® is a registered trademark of MH Sub I, LLC
Copyright ©2001 - , vbulletin.org. All rights reserved.