I'm trying to get my navigation to work on Silver Stripe, it works perfectly well in my test html pages. What I need to do is assign the class head to the navigation menu link that has children, the html code is as follows:
<div id="navigationTop">
<ul>
<li><a href="about.php" class="current">About</a></li>
<li>
<a href="holistic-approaches.php" class="head">Holistic Approaches</a>
<ul>
<li><a href="readings.php">Readings</a></li>
<li><a href="reiki.php">Reiki</a></li>
<li><a href="healing.php">Healing</a></li>
</ul>
</li>
<li><a href="life-coaching.php">Life Coaching</a></li>
<li><a href="workshops.php">Workshops & Courses</a></li>
<li><a href="">Testimonials</a></li>
<li><a href="">Events</a></li>
<li><a href="">News</a></li>
</ul>
</div>
My silver stripe code is:
<div id="navigationTop">
<ul>
<% control Menu(1) %>
<li>
<a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode"><span>$MenuTitle</span></a>
<% if Menu(2) %>
<ul>
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>
</li>
<% end_control %>
</ul>
</div>
What I'm trying to do is get the class "head" into the following line after the class applied to $LinkingMode and I've tried various if statements to do this, eg:
<a href="$Link" title="Go to the $Title.XML page" class="$LinkingMode <% if Title="Holistic Approacges" %>head<% end_if %>
"><span>$MenuTitle</span></a>
but this doesn't work.
How can I do this?