glass-mapper

Glass.Mapper not applies additional parameters in BeginRenderLink method

倾然丶 夕夏残阳落幕 提交于 2019-12-02 03:49:21
For Glass.Mapper BeginRenderLink described as method to render a link that should contain multiple HTML elements: http://glass.lu/docs/tutorial/sitecore/tutorial22/tutorial22.html What I'd like to add is custom attributes (class, style) to that link: <% using (BeginRenderLink(x => x.Image1Link, new NameValueCollection { { "class", "image-banner" }, { "style", string.Format("background-image: url({0})", Model.Image1.Src) } }, true)) { %> <span class="image-banner-wrapper"> <span class="image-banner-content"><%= Editable(x => x.Image1Text) %></span> </span> <% } %> This additional attributes

Sitecore Glass Mapper always null

血红的双手。 提交于 2019-11-29 14:20:25
I am using Sitecore Glass Mapper for a new project I'm setting up. We are using Sitecore 7.2, latest version of Team Development for Sitecore (TDS) code generation and the latest version of glass. The code I am trying to execute: var b = new SitecoreContext(); var c = b.GetCurrentItem<T01_Homepage>(); b is not null. c is null. var d = b.GetItem<T01_Homepage>("path") d is null. I added my assembly in GlassMapperScCustom: public static IConfigurationLoader[] GlassLoaders(){ var attributes = new AttributeConfigurationLoader(new[] { "Company.Framework.Websites.Corporate", "Company.Framework.Core",

Can Glass.Mapper V3 support language fallback (field-level and item-level)?

混江龙づ霸主 提交于 2019-11-28 00:46:07
问题 We just updated our project to use Glass.Mapper V3. We LOVE it. But we've encountered an issue. It doesn't seem to respect language fallback. We have our site set up so that if a user picks a non-default language, they will see the item of that language if it exists. If not, they will see the default ("fallback") language version. We have also set this up at the field level, so that if there is a non-default version of an item but not all the fields are changed, any unchanged fields will fall