I have a website running in Microsoft SharePoint which uses menus and other data from Dynamics AX 4.0. I have a weblet in the website where I fetch a menu from Dynamics AX, which uses the WebMenuWebLet and WebVertMenuHTML classes to generate the HTML to be displayed on the page. I have now tried to strip everything from the weblet to reconstruct it from scratch to fit my design, but it still outputs some data.
I read on this page that the WebParts in Dynamics AX always output some boilerplate HTML, and what I am getting is indeed the HTML snippet in this blog. However, I also get more HTML code:
<link rel="stylesheet" type="text/css" href="/_layouts/ep/stylesheets/AXEP.css">
This stylesheet has a lot of definitions, some conflicting with my own, so I’d like to get rid of the link to it. Deleting the contents of AXEP.css is not an option, as I am reconstructing a live website where the old part is still using that data, and I have to work on the same Dynamics AX server as is being used for the live site.
I can imagine it being difficult to remove the <table> tag mentioned in the blog I linked to, but I am hoping that there is some way for me to remove the link to the stylesheet. I have searched through all the class definitions in Dynamics AX, but found nothing that helped me, so is there any other place I should look?
I’m sorry if the information is vague, I’m kinda lost when it comes to those Microsoft solutions.
It’s been a long time since a asked and I’d like to close the question, so here is what I did:
I noticed that the
<link>tag that points to the extra CSS is only inserted in the first WebPart on the page. Instead of getting rid of it I added an extra WebPart to the top of the page that did nothing but output this boilerplate<link>tag (along with some<script>tags that I didn’t want either) and wrapped it inside an HTML comment:<!-- -->. It is still inserted into the page now, but the browser ignores it so the CSS doesn’t affect the layout of the page.It is an ugly hack, but it was the best I could come up with at the time.