Gre*_*ers 5 xslt sharepoint sharepoint-designer sharepoint-online
是的,我知道这是重复的,但是其他答案现在已经过时了。我将SharePoint Online与SharePoint Designer 2013一起使用。
我想为SharePoint列表视图设置disable-output-escaping = yes。
这是我尝试过的:
这是我对aspx的看法:
<FieldRef Name="After_x0020_Mitigation"/></ViewFields>
<RowLimit Paged="TRUE">100</RowLimit><Aggregations Value="Off"/
<JSLink>clienttemplates.js</JSLink><XslLink default="TRUE">Main.xsl</XslLink>
Run Code Online (Sandbox Code Playgroud)
小智 0
我不知道在哪里放置“disable-output-escaping=yes”,并且找不到该信息。
但是,您可以使用字段模板来实现此结果。像这样的东西;
(function () {
// Create an object that have the context information about the fields that we want to change the rendering of.
var nameFiledContext = {};
nameFiledContext.Templates = {};
nameFiledContext.Templates.Fields = {
// Apply the new hyperlink HTML Rendering to the field in your view. Swap out "<Your Field Name>" for your field name
"<Your Field Name>": { "View": nameFiledTemplate }
};
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(nameFiledContext);
})();
// This function applies the rendering logic
function nameFiledTemplate(ctx) {
var name = ctx.CurrentItem.ID; //Swap out name variable for whatever field contains your hyperlink name
return "<a target='_blank' href='<Your Hyperlink Here>'>"
+ name + "</a>"; //Put the url for your hyperlink in the href above
} Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
134 次 |
| 最近记录: |