Skip to content

Instantly share code, notes, and snippets.

@ppadron
Created January 4, 2011 00:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppadron/764240 to your computer and use it in GitHub Desktop.
Save ppadron/764240 to your computer and use it in GitHub Desktop.
<?php
$items = array(
array('componentType' => 'Jsw.Pathbar.Item', 'title' => 'Page 1', 'href' => '/my/page/1'),
array('componentType' => 'Jsw.Pathbar.Item', 'title' => 'Page 2', 'href' => '/my/page/2')
array('componentType' => 'Jsw.Pathbar.Item', 'title' => 'Page 3', 'href' => '/my/page/3')
);
?>
<!-- This is where your pathbar will be rendered -->
<div id="pathbar-wrapper"></div>
<script type="text/javascript">
Jsw.onReady(function() {
new Jsw.Pathbar({
id: 'pathbar',
cls: 'pathbar clearfix',
renderTo: 'pathbar-wrapper',
items: <?php echo json_encode($items); ?>
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment