How to view only one item of Action items on theme.tpl

rob2

Joined: 2005-08-07
Posts: 40
Posted: Sat, 2005-08-20 22:12

In the theme.tpl I want insert only an item of Action items;
for example the item slideshow;

I have see the code that insert all itemes is here: ItemLinks.tpl

{if !isset($links)}{assign var="links" value=$theme.itemLinks}{/if}

{foreach from=$links item=link}
<a href="{g->url params=$link.params}" class="gbAdminLink {g->linkid urlParams=$link.params}">{$link.text}</a>
{/foreach}

where if I not want the class is:
<a href="{g->url params=$link.params}">{$link.text}</a>

this is the code that insert all the items;

but if I want only one, how I can to do?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sat, 2005-08-20 22:40

- deactivate the modules that provide this functionality, e.g. if you don't want the slideshow links, deactivate the slideshow module
- some options are bound to permissions, revoke the permissions
- if you still want the feature, but not the link, you'll need some smarty {if $link.text ... condition}

 
rob2

Joined: 2005-08-07
Posts: 40
Posted: Sat, 2005-08-20 23:48

I not want deactive all the other modules;
I want only see one (perhaps also two/three in future) items, but in different position of theme.tpl's layout)

I thinked that was more simple ;-(

but if this is the code that insert the items
{foreach from=$links item=link}
<a href="{g->url params=$link.params}">{$link.text}</a>
{/foreach}

where $link.params is an array, isn't possible insert directly a value
(example a name that item that i want e.g. type slideshow) .

If the cicle foreach insert one for one all the values, how I can insert only
one my value?

thanks

 
peter_k

Joined: 2005-09-15
Posts: 134
Posted: Mon, 2005-10-03 09:27

to display only one link, use the workaround described in this post.

to use this for other item links, check the moduleId of each of them (use buffered debug mode to look up the Id).