Building your Breadcrumbs

Status
Not open for further replies.
Joined
Oct 6, 2010
Messages
105
So, unlike vBulletin breadcrumbs are built inside of templates (and as Kier so aptly pointed out, my example below is directly from him. :D)

XenForo comes with this handy, dandy little tag called:
HTML:
<xen:navigation></xen:navigation>

Inside of it, you place the following code to build your navigation (and I'm assuming the more you have, the deeper the level, but don't quote me on that):
HTML:
	<xen:breadcrumb href="Linky">Title</xen:breadcrumb>

However, Jaxel has figured out how to do this programmatically. Instead of placing an href="" inside of the title, place the following HTML in the template:
HTML:
<xen:breadcrumb source="$breadCrumbs"></xen:breadcrumb>

And the following in your class:
PHP:
$breadCrumbs['test'] = array([/FONT]
[FONT=Georgia]    'value' => 'test',[/FONT]
[FONT=Georgia]    'href' => XenForo_Link::buildPublicLink('full:portal', $page)  );
So, you're final "navigation/breadcrumb" setup (where as vBulletin you required PHP code and such to build this) would look as such:
HTML:
<xen:navigation>[/FONT]
[FONT=Georgia]<xen:breadcrumb href="Linky">Title</xen:breadcrumb>[/FONT]
[FONT=Georgia]</xen:navigation>[/FONT]
[FONT=Georgia]
So, this is probably the first actual thing I've learned about XenForo's inner structure, and I'm proud of it... So, thank you Kier (even tho you sorta made fun of me. :p)![/php][/FONT]
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,096
Looks great :) Thank you for sharing this tutorial.
 

Floris

I'm just me :) Hi.
Staff member
Joined
Jan 1, 2001
Messages
60,096
I love how with XenForo everybody is just constantly learning and helping each other out. Great social feeling. +1
 
Status
Not open for further replies.
Top