Glass.Mapper not applies additional parameters in BeginRenderLink method

前端 未结 1 1118
伪装坚强ぢ
伪装坚强ぢ 2021-01-24 11:52

For Glass.Mapper BeginRenderLink described as method to render a link that should contain multiple HTML elements: http://glass.lu/docs/tutorial/sitecore/tutoria

相关标签:
1条回答
  • 2021-01-24 12:18

    As it seems this is a known issue with Glass and there is already a pull request pending for it (https://github.com/mikeedwards83/Glass.Mapper/pull/73).

    I guess the only way to fix it is to get the latest version from GitHub make the fix and recompile the Glass with your fix. Otherwise you can wait for the pull request to get approved and update your Glass version. As you can see the fix is not that hard (taken from here):

    if (IsInEditingMode && isEditable)
    {   
        if (attrs != null)
        {
            attrs.Add("haschildren", "true");
            return MakeEditable(field, null, model, attrs, _context, SitecoreContext.Database, writer);
        }
    
        return MakeEditable(field, null, model, "haschildren=true", _context, SitecoreContext.Database, writer);
     }
    
    0 讨论(0)
提交回复
热议问题