function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Chris MoynihanChris Moynihan 

Custom Tab page with enhanced list, double icons

I have two icons on my replacement page for a custom tab. One is from the enhanced list, and the other from section header.

Can I remove the icon from the enhanced list or from the section header? I only want one.

User-added image
 
<apex:page showHeader="true" tabstyle="SEActivity__c">
    <apex:sectionHeader title="SE Activities" subtitle="Home" />
    <apex:enhancedList type="SEActivity__c" height="600" rowsPerPage="50" />
</apex:page>



 
Best Answer chosen by Chris Moynihan
Vishal_GuptaVishal_Gupta
Hi Chris,

Please give a try with below code in your page load method :

document.getElementsByClassName('pageTitleIcon')[0].style.display = "none";

Thanks,
Vishal

All Answers

Vishal_GuptaVishal_Gupta
Hi Chris,

As this is your custom VF page, you can search one of the image in javascript and set style display:none; for it to hide from UI. you can inspect element on the one of image and then search that id in javascript and can set above style to hide it.

Please let me know if more information is require.

Thanks,
Vishal
Chris MoynihanChris Moynihan
Thanks Vishal.

Taking a look at the HTML, both icons are image tags that have no id, just in two different locations within the page:
<img class="pageTitleIcon" alt="Opportunity Time" title="Opportunity Time" src="/s.gif">
Should I search for the parent <div> and remove the node? I'm not quite sure how to go about that, but I'll see if I can find some examples.
 
Vishal_GuptaVishal_Gupta
Hi Chris,

Please give a try with below code in your page load method :

document.getElementsByClassName('pageTitleIcon')[0].style.display = "none";

Thanks,
Vishal
This was selected as the best answer
Chris MoynihanChris Moynihan
Vishal,

Worked like a charm and saved me a ton of time figuring it out on my own. Thanks!