Skip to content

Instantly share code, notes, and snippets.

@mrkurt
Created February 6, 2009 19:15
Show Gist options
  • Save mrkurt/59555 to your computer and use it in GitHub Desktop.
Save mrkurt/59555 to your computer and use it in GitHub Desktop.
<mt:SetVarTemplate name="main_menu">
<mt:CategoryBasename default="no-cat" separator="-" setvar="tl_basename" /><!-- <mt:var name="tl_basename" /> -->
<ul id="primary-navigation">
<li<mt:if var="tl_basename" eq="no-cat"> class="current-selection"</mt:if>><a href="<mt:BlogURL />">All</a></li>
<li<mt:if var="tl_basename" eq="apple"> class="current-selection"</mt:if>><a href="<mt:BlogURL />apple/">Apple</a></li>
<li<mt:if var="tl_basename" eq="business"> class="current-selection"</mt:if>><a href="<mt:BlogURL />business/">Business</a></li>
<li<mt:if var="tl_basename" eq="gadgets"> class="current-selection"</mt:if>><a href="<mt:BlogURL />gadgets/">Gadgets</a></li>
<li<mt:if var="tl_basename" eq="gaming"> class="current-selection"</mt:if>><a href="<mt:BlogURL />gaming/">Gaming</a></li>
<li<mt:if var="tl_basename" eq="hardware"> class="current-selection"</mt:if>><a href="<mt:BlogURL />hardware/">Hardware</a></li>
<li<mt:if var="tl_basename" eq="microsoft"> class="current-selection"</mt:if>><a href="<mt:BlogURL />microsoft/">Microsoft</a></li>
<li<mt:if var="tl_basename" eq="open-source"> class="current-selection"</mt:if>><a href="<mt:BlogURL />open-source/">Open Source</a></li>
<li<mt:if var="tl_basename" eq="science"> class="current-selection"</mt:if>><a href="<mt:BlogURL />science/">Science</a></li>
<li<mt:if var="tl_basename" eq="tech-policy"> class="current-selection"</mt:if>><a href="<mt:BlogURL />tech-policy/">Tech Policy</a></li>
<li id="primary-navigation-more">
<a id="primary-navigation-more-link" href="#">More</a>
<ul>
<li><a href="<mt:BlogURL />media/">Media</a></li>
<li><a href="<mt:BlogURL />software/">Software</a></li>
<li><a href="<mt:BlogURL />security/">Security</a></li>
<li><a href="<mt:BlogURL />staff/">Staff</a></li>
<li><a href="<mt:BlogURL />telecom/">Telecom</a></li>
<li><a href="<mt:BlogURL />web/">Web</a></li>
</ul>
</li>
</ul>
</mt:SetVarTemplate>
<mt:if tag="TopLevelParent">
<!--- Is in cat -->
<mt:TopLevelParent><mt:var name="main_menu" /></mt:TopLevelParent>
<mt:else>
<!--- is not in cat -->
<mt:var name="main_menu" />
</mt:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment