Building your Breadcrumbs

Status
Not open for further replies.
Oct 6, 2010
105
9
225
32
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]
 
  • Like
Reactions: 3,362 people
Status
Not open for further replies.