質問

Any help? Other fields such as ID works fine..

window.COB = window.COB || {};
window.COB.accordionItem = {
customItemHtml: function (ctx) {

    var accordionItemHtml = "<div title='" + ctx.CurrentItem.Title + "'>" + ctx.CurrentItem.Description;
    accordionItemHtml += "</div>";  
    return accordionItemHtml;
}
};
(function () {
var overrideCtx = {};
overrideCtx.Templates = {};
overrideCtx.Templates.Item = window.COB.accordionItem.customItemHtml;
SPClientTemplates.TemplateManager.RegisterTemplateOverrides(overrideCtx);
})();
役に立ちましたか?

解決

Your code looks fine so I added it to a demo site and it works. I would suggest doing as @Deepmala suggested and check that Title and Description fields are included in the current view.

ライセンス: CC-BY-SA帰属
所属していません sharepoint.stackexchange
scroll top