This module provides some extra types (Secondary, Footer) of nav in the admin and views.
- "silverstripe/framework": "~3.1.0"
{
"require": {
"btlcreative/silverstripe-extra-navs": "master"
},
"repositories": [
{
"type": "git",
"url": "[email protected]:btlcreative/silverstripe-extra-navs.git"
}
]
}
- Download a compressed version of silverstripe-extra-nav
- Unpackage in the root of your silverstripe project
- Run a
dev/build
- From Views, you can access the dataobjects with
$SecondaryNav
and$FooterNav
<% if $FooterNav %>
<ul class="navigation">
<% loop $FooterNav %>
<li>
<% if InternalLink %>
<a href="$InternalLink.Link" title="Go to the $LinkText.XML page" class="$LinkOrSection">$LinkText</a>
<% else %>
<a href="$ExternalLink" title="Go to the $LinkText.XML page" class="$LinkOrSection">$LinkText</a>
<% end_if %>
</li>
<% end_loop %>
</ul>
<% end_if %>
Would benefit greatly from a refactoring - first attempt at a silverstripe module.