gpt4 book ai didi

block - 移除 EPiServer 7 Shared Block 周围生成的

转载 作者:行者123 更新时间:2023-12-01 10:57:29 24 4
gpt4 key购买 nike

Episerver 总是将共享 block 包装在一个标签中。我想摆脱这个。因此,如果在我的 LinkBlock 中有一个只有
的模板 <a href="#" >链接</a >
我不会得到一个
<div > <a href="#" >链接</a > </div >
在用户 View 中。

如果这不可能,我该如何更改 <div > 到任何其他标签,或在其上放置一个 CssClass。就像在非共享 block 中是可能的:
<EPiServer:Property runat="server" PropertyName="RightContentArea" CustomTagName="aside" CssClass="column-2 sidebar" > </EPiServer:Property >

最佳答案

我相信是 ContentArea 属性的渲染在它包含的 block 周围添加了 div 标签。

EPiServer 建议 in order to preserve the editing functionality of the block elements themselves they need to have the div around them .

一个可能的解决方案可能是您自己做 custom rendering of content areas ,但根据您使用的 block 模板的种类,编辑工作可能会很棘手。链接中的示例用于渲染多个相同类型的 block 。

关于block - 移除 EPiServer 7 Shared Block 周围生成的 <div>,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14361347/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com