Sometimes we are asked to customize the layout of a page. The changes are often small and don’t necessarily require a change to the site master page or css file. For example, the client requests to hide the ‘Site Action’ menu on a Dynamics AX 2009 EP page to disable the user to change the page layout.
Now I use the purchase requisition lists as an example:
On the page, right click and select View Source
In the source file, the CSS class used in Site Action menu is .ms-siteaction
Open Visual Studio 2008 and edit the user control PurchReqTableList. In the PurchReqTableList.ascx file, add the following code
<style type="text/css">
.ms-siteaction { display:none ;}
</style>
Save the change and update the portal.
Now you can see the ‘Site Action’ menu is gone.
Similarly, if we want to hide the breadcrumbs, we can use the same way as well.
Put the following code in the .ascx file:
<style type="text/css">
.ms-siteaction { display:none ;} .ms-sitemapdirectional { display: none; } .ms-titlearea { display: none; }
</style>
Save the changes and update the portal, you will find both the breadcrumbs and site action menu are gone.
Hi, Fred,
It is very userful. Thanks