从 Microsoft Dynamics AX 中的 WebPart 控制 HTML

发布于 2024-09-25 11:31:30 字数 824 浏览 0 评论 0原文

我有一个在 Microsoft SharePoint 中运行的网站,该网站使用 Dynamics AX 4.0 中的菜单和其他数据。我在网站中有一个 weblet,可以从 Dynamics AX 获取菜单,该菜单使用 WebMenuWebLet 和 WebVertMenuHTML 类生成要在页面上显示的 HTML。我现在尝试从 weblet 中剥离所有内容,从头开始重建它以适合我的设计,但它仍然输出一些数据。

我在此页面上读到 Dynamics AX 中的 WebPart总是输出一些样板 HTML,而我得到的确实是这个博客中的 HTML 片段。然而,我也得到了更多的 HTML 代码:

<link rel="stylesheet" type="text/css" href="/_layouts/ep/stylesheets/AXEP.css">

这个样式表有很多定义,有些与我自己的定义相冲突,所以我想删除它的链接。删除 AXEP.css 的内容不是一个选项,因为我正在重建一个实时网站,其中旧部分仍在使用该数据,并且我必须在与实时站点使用的同一台 Dynamics AX 服务器上工作。

我可以想象删除 是很困难的。我链接到的博客中提到的标签,但我希望有某种方法可以删除样式表的链接。我已经搜索了 Dynamics AX 中的所有类定义,但没有找到任何对我有帮助的内容,那么我还应该查看其他地方吗?

如果信息含糊,我很抱歉,当谈到这些 Microsoft 解决方案时,我有点迷失了。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

沧笙踏歌 2024-10-02 11:31:30

查看 Sharepoint,因为 AX 似乎没有发出此代码。

您很可能应该创建一个新的企业门户样式表,然后创建< a href="http://msdn.microsoft.com/en-us/library/aa867986.aspx" rel="nofollow">新的 Sharepoint 主题。

Look in Sharepoint, since AX does not seem to emit this code.

You should most likely create a new Enterprise Portal style sheet and then create a new Sharepoint theme.

意中人 2024-10-02 11:31:30

自从提问以来已经很长时间了,我想结束这个问题,所以这就是我所做的:

我注意到仅插入了指向额外 CSS 的 标签在页面上的第一个 WebPart 中。我没有删除它,而是在页面顶部添加了一个额外的 WebPart,它除了输出此样板 标记(以及一些

这是一个丑陋的黑客,但这是我当时能想到的最好的办法。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文