coronapro
(CoronaPro)
1
I need to remove the API link at the top of the page, but keep the plugin itself operating.
I have been seraching through the code and have not yet found where this is generated, all i have been able to do is remove the content from the page.
Thanks
gusgus
(Gus)
2
Hi,
You can look at this file : piwik/plugins/CoreHome/templates/top_bar.tpl
The div “topLeftBar” contains the elements you want to edit.
coronapro
(CoronaPro)
3
Thanks.
I added an extra if statement inside the foreach to check if the name is “API”, code below
{if $element.0 != 'API' } ... {/if}
radk
4
Hi,
Can you help me out and post your full code from the topLeftBar section? I am trying to get rid of the API link, but my PHP skills are limited. 
Greatly appreciate it!
What do I need to modify in the below code?
{foreach from=$topMenu key=label item=menu name=topMenu}
{if isset($menu._html)}
{$menu._html}
{elseif $menu._url.module == $currentModule}
{$label|translate} |
{else}
{$label|translate} |
{/if}
{/foreach}
thanks…
kodepree
(Ko de Pree)
5
In Piwik 1.4 I removed some links (API and Widgets) in the topmenu with the following code in the file /plugins/CoreHome/templates/top_bar.tpl
<div id="topBars">
<div id="topLeftBar">
{foreach from=$topMenu key=label item=menu name=topMenu}
{if isset($menu._html)}
{$menu._html}
{elseif $menu._url.module == 'API'}
{elseif $menu._url.module == 'Widgetize'}
{elseif $menu._url.module == $currentModule}
<span class="topBarElem"><b>{$label|translate}</b></span> |
{else}
<span class="topBarElem"><a id="topmenu-{$menu._url.module|strtolower}" href="index.php{$menu._url|@urlRewriteWithParameters}">{$label|translate}</a></span> |
{/if}
{/foreach}
</div>
<div id="topRightBar">
{capture assign=helloAlias}{if !empty($userAlias)}{$userAlias}{else}{$userLogin}{/if}{/capture}
<span class="topBarElem">{'General_HelloUser'|translate:"<strong>$helloAlias</strong>"}</span>
{if $userLogin != 'anonymous'}| <span class="topBarElem"><a href='index.php?module=CoreAdminHome'>{'General_Settings'|translate}</a></span>{/if}
| <span class="topBarElem">{if $userLogin == 'anonymous'}<a href='index.php?module={$loginModule}'>{'Login_LogIn'|translate}</a>{else}<a href='index.php?module={$loginModule}&action=logout'>{'Login_Logout'|translate}</a>{/if}</span>
</div>
</div>
{if $showSitesSelection}{include file="CoreHome/templates/sites_selection.tpl"}{/if}
How would you remove the Feedback link?
kodepree
(Ko de Pree)
7
Feedback is a Plugin which you can turn off.