Theming: Adding Menu on SingleBody.tpl

ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Mon, 2005-04-18 07:49

I am basically looking for a way to adapt the (Item) Menu to be available on the SingleBody.tpl.

Any Suggestions??

	{if !empty($child.itemLinks)}
	  <select onchange="{literal}javascript:if (this.value) { newLocation = this.value; this.options[0].selected = true; location.href= newLocation; }{/literal}">
	    <option label="{if $child.canContainChildren}{g->text text="&amp; album actions &amp;"}{else}{g->text text="&amp; item actions &amp;"}{/if}" value="">{if $child.canContainChildren}{g->text text="&amp; album actions &amp;"}{else}{g->text text="&amp; item actions &amp;"}{/if}</option>

	    {foreach from=$child.itemLinks item=link}
	      <option label="{$link.text}" value="{$link.url}">{$link.text}</option>
	    {/foreach}
	  </select>
	{/if}
 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-04-18 14:09

i think it's $layout.itemLinks not $child.itemLinks
and you don't need the $child.canContainChildren check.. it is false. if the item can contain children then it will use albumBody.tpl.