<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarai.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Add/Remove Profile Action Links</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Add/Remove Profile Action Links</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links</link><pubDate>Mon, 26 Sep 2022 19:26:06 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5736c603-4192-408a-9dbe-54c4d3292fa9</guid><dc:creator>Scott King</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links#comments</comments><description>Current Revision posted to Dev Tutorials by Scott King on 9/26/2022 7:26:06 PM&lt;br /&gt;
&lt;h4 id="Adding_Profile_Action_Links"&gt;Adding Profile Action Links&lt;/h4&gt;
&lt;p&gt;The example below demonstrates how to add a profile action link to the Styleguide. To define your own profile action link, create your own label extension for the link&amp;#39;s display label.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/Extension/application/Ext/Language/en_us.addProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="php"&gt;&amp;lt;?php

//create the links label
$app_strings[&amp;#39;LNK_USERS_C&amp;#39;] = &amp;#39;Users&amp;#39;;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Next, create the&amp;nbsp;profile action link extension&amp;nbsp;&lt;code&gt;./custom/Extension/application/Ext/clients/base/views/profileactions/addProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="php"&gt;&amp;lt;?php

$viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;][] = array(
    &amp;#39;route&amp;#39; =&amp;gt; &amp;#39;#Users&amp;#39;,
    &amp;#39;label&amp;#39; =&amp;gt; &amp;#39;LNK_USERS_C&amp;#39;,
    &amp;#39;icon&amp;#39; =&amp;gt; &amp;#39;sicon-link&amp;#39;,
);&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Once you have created the&amp;nbsp;extension files, navigate to Admin &amp;gt; Repair &amp;gt; Quick Repair and Rebuild.&amp;nbsp;This will append your profile action&amp;nbsp;item to the existing list of links.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You may need to refresh the page to see the new profile menu items.&lt;/p&gt;
&lt;h4 id="Removing_Profile_Action_Links"&gt;&lt;a class="header-anchor" href="https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.1/User_Interface/MegaMenu/#Removing_Profile_Action_Links"&gt;&lt;span class="glyphicon glyphicon-link"&gt;&lt;/span&gt;&lt;/a&gt;Removing Profile Action Links&lt;/h4&gt;
&lt;p&gt;To remove a profile action link, loop through the list of profile actions and remove the item by one of its properties. For your reference, the stock profile actions can be found in &lt;code&gt;./clients/base/views/profileactions/profileactions.php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/Extension/application/Ext/clients/base/views/profileactions/removeProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="php"&gt;&amp;lt;?php

if (isset($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;])) {
    foreach ($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;] as $key =&amp;gt; $profileAction) {
        //remove the link by label key
        if (in_array($profileAction[&amp;#39;label&amp;#39;], array(&amp;#39;LNK_ABOUT&amp;#39;))) {
            unset($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;][$key]);
        }
    }
}&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Once you have created the&amp;nbsp;extension files, navigate to Admin &amp;gt; Repair &amp;gt; Quick Repair and Rebuild.&amp;nbsp;This will remove&amp;nbsp;the&amp;nbsp;profile action&amp;nbsp;item from the existing list of links.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;You may need to refresh the page to see the profile menu items removed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Add/Remove Profile Action Links</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links/revision/3</link><pubDate>Mon, 26 Sep 2022 18:26:19 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5736c603-4192-408a-9dbe-54c4d3292fa9</guid><dc:creator>Scott King</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links#comments</comments><description>Revision 3 posted to Dev Tutorials by Scott King on 9/26/2022 6:26:19 PM&lt;br /&gt;

&lt;h4 id="Adding_Profile_Action_Links"&gt;Adding Profile Action Links&lt;/h4&gt;
&lt;p&gt;The example below demonstrates how to add a profile action link to the Styleguide. To define your own profile action link, create your own label extension for the link&amp;#39;s display label.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/Extension/application/Ext/Language/en_us.addProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;?php

//create the links label
$app_strings[&amp;#39;LNK_USERS_C&amp;#39;] = &amp;#39;Users&amp;#39;;&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Next, create the&amp;nbsp;profile action link extension&amp;nbsp;&lt;code&gt;./custom/Extension/application/Ext/clients/base/views/profileactions/addProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="php"&gt;&amp;lt;?php

$viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;][] = array(
    &amp;#39;route&amp;#39; =&amp;gt; &amp;#39;#Users&amp;#39;,
    &amp;#39;label&amp;#39; =&amp;gt; &amp;#39;LNK_USERS_C&amp;#39;,
    &amp;#39;icon&amp;#39; =&amp;gt; &amp;#39;sicon-link&amp;#39;,
);&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Once you have created the&amp;nbsp;extension files, navigate to Admin &amp;gt; Repair &amp;gt; Quick Repair and Rebuild.&amp;nbsp;This will append your profile action&amp;nbsp;item to the existing list of links.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; You may need to refresh the page to see the new profile menu items.&lt;/p&gt;
&lt;h4 id="Removing_Profile_Action_Links"&gt;&lt;a class="header-anchor" href="https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_12.1/User_Interface/MegaMenu/#Removing_Profile_Action_Links"&gt;&lt;span class="glyphicon glyphicon-link"&gt;&lt;/span&gt;&lt;/a&gt;Removing Profile Action Links&lt;/h4&gt;
&lt;p&gt;To remove a profile action link, loop through the list of profile actions and remove the item by one of its properties. For your reference, the stock profile actions can be found in &lt;code&gt;./clients/base/views/profileactions/profileactions.php&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;./custom/Extension/application/Ext/clients/base/views/profileactions/removeProfileActionLink.php&lt;/code&gt;:&lt;/p&gt;
&lt;pre class="line-numbers  language-php"&gt;&lt;pre class="ui-code" data-mode="php"&gt;&amp;lt;?php

if (isset($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;])) {
    foreach ($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;] as $key =&amp;gt; $profileAction) {
        //remove the link by label key
        if (in_array($profileAction[&amp;#39;label&amp;#39;], array(&amp;#39;LNK_ABOUT&amp;#39;))) {
            unset($viewdefs[&amp;#39;base&amp;#39;][&amp;#39;view&amp;#39;][&amp;#39;profileactions&amp;#39;][$key]);
        }
    }
}&lt;/pre&gt;&lt;/pre&gt;
&lt;p&gt;Once you have created the&amp;nbsp;extension files, navigate to Admin &amp;gt; Repair &amp;gt; Quick Repair and Rebuild.&amp;nbsp;This will remove&amp;nbsp;the&amp;nbsp;profile action&amp;nbsp;item from the existing list of links.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&amp;nbsp;You may need to refresh the page to see the profile menu items removed.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Add/Remove Profile Action Links</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links/revision/2</link><pubDate>Fri, 23 Sep 2022 18:56:54 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5736c603-4192-408a-9dbe-54c4d3292fa9</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links#comments</comments><description>Revision 2 posted to Dev Tutorials by Rafael Fernandes on 9/23/2022 6:56:54 PM&lt;br /&gt;
&lt;p&gt;Add/Remove Profile Action Links&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;ok from old doc (just update icon to sicon).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Add/Remove Profile Action Links</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links/revision/1</link><pubDate>Tue, 20 Sep 2022 19:06:50 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:5736c603-4192-408a-9dbe-54c4d3292fa9</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/744/add-remove-profile-action-links#comments</comments><description>Revision 1 posted to Dev Tutorials by Rafael Fernandes on 9/20/2022 7:06:50 PM&lt;br /&gt;
&lt;p&gt;Add/Remove Profile Action Links&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>