Questions tagged [glass-mapper]

Glass.Mapper is a Sitecore module that provides an ORM solution for the Sitecore CMS.

Glass.Mapper is an open source object mapping framework for .NET CMS systems

302 questions
1
vote
2 answers

Exception in Glass mapper for Sitecore in PageEditor mode

For the code: strMenuText.Append(RenderLink(mainlinkitem, x => x.NavigationItem.Url.StringToLink(), isEditable: true, contents: mainlinkitem.NavigationTitle)); Here mainlinkitem is Navigation object for…
Harsh Baid
  • 7,199
  • 5
  • 48
  • 92
1
vote
2 answers

Sitecore Glass Mapper (v3) for query based property not being populated

update: I'm using Sitecore version 7.0 I'm using Glass.Mapper.Sc with success so far. I've got a number of models being succesfully mapped. I've now just tried my first Query mapping and cannot get it to work. I have the following two…
Rob Gray
  • 3,186
  • 4
  • 33
  • 34
1
vote
1 answer

WCF and Castle library (Glass Mapper)

hello I have WCF service with webHttpEndpointBehavior under Sitecore 6 and I use Glass Mapper to read items, Glass mapper has depends on Castle library. It is working well, but i have some methods with Contract like: [OperationContract] …
Arbejdsglæde
  • 13,670
  • 26
  • 78
  • 144
0
votes
1 answer

Sitecore create item programmatically with over 100 fields using GlassMapper

I need to write a job to create 1000s of items in Sitecore. I want to avoid, since there are 100s of fields: newItem.Fields["Title"].Value = "NewValue1"; Can I use GlassMapper (which I believe needs to run in the MVC context) or an equivalent to do…
0
votes
0 answers

Glassmapper for TreelistEx with items of multiple templates

In Sitecore, I have a Carousel template in which there is slides field of type TreelistEx. Slides would contain any items based on either DesignedSlide or VideoSlide template. DesignedSlide or VideoSlide are inheriting from BaseSlide…
Parry Brookes
  • 319
  • 1
  • 2
  • 10
0
votes
0 answers

Getting Rendering Parameters for a different item than the current

We've got a rendering that needs to inherit it's rendering parameters from an ancestor item. Knowing the ID of the item I'm trying to inherit from, how do I get that item's rendering parameters with Glass?
hofo
  • 522
  • 1
  • 4
  • 16
0
votes
0 answers

Glass Mapper loads collections only for interfaces

Using Sitecore 10.2 and Glass Mapper 5.8.180 After upgrade from Sitecore 8.2 and switching to above mentioned version of Glass Mapper our code stopped loading collection references. I am aware that in Glass Mapper now the lazy loading is turned on…
Wojtek
  • 135
  • 1
  • 1
  • 9
0
votes
1 answer

Glass Mapper "Unrecognized Guid format" error on MapPropertiesToObject

I'm getting an error from GlassMapper on certain pages in my Sitecore solution. public override void Execute(ObjectConstructionArgs args) { // check that no other task has created an object and that this is a dynamic object …
Erica Stockwell-Alpert
  • 4,624
  • 10
  • 63
  • 130
0
votes
2 answers

Cannot find "sc" namespace in "Glass.Mapper.Sc" with same version in new project

I created a new .NET XUnit Core Project, converted it .NET Framework 4.6.1 to be similar to rest of legacy solution and tried to add in a new test. I realized that I need Glass Mapper for an ISitecoreContext (which I think might be depreciated but…
Ross Gustafson
  • 1,182
  • 3
  • 16
  • 32
0
votes
1 answer

Weird behavior rendering links with Glass Mapper after Sitecore upgrade

I ran into some weird behavior in Glass Mapper on a recent project, and I wonder if anyone has any insights. I’m tasked with upgrading Sitecore from 8.1 (rev. 160519) to 8.2 Update 7 (the latest 8.x version). When the upgrade was complete, I ran…
Danimal
  • 7,672
  • 8
  • 47
  • 57
0
votes
1 answer

Unable to find version '4.2.1.188' of package 'Glass.Mapper'

I am new to Sitecore and Glass.Mapper tools. I am working with Visual Studio 2013 and Sitecore 8.1 for a solution I have begun working on (not the author). Due to other questions I have observed, I will try to demonstrate what my solution now has…
Taersious
  • 751
  • 9
  • 20
0
votes
1 answer

Uppercase and lowercase mapping of GUID in Glass.Mapper

what determines on how GUID are mapped from sitecore using Glass.Mapper: uppercase vs lowercase? Now I see it's lowercase but I can bet I had in the past uppercase.
Saint
  • 5,397
  • 22
  • 63
  • 107
0
votes
1 answer

How to map DropList in Sitecore Glass.Mapper

I am mapping Sitecore Items using GlassMapper v5 in Sitecore. We implemented the following classes with GlassMapper. However, although the value of the field is acquired for the ItemTemplate item, the value of the Droplist field (CategoryTemplate)…
0
votes
0 answers

Using RenderImage does not make Image editable in Experience Editor

We use Glass Mapper as an ORM for our MVC Sitecore solution. Sample code used to render an image is below. RenderImage(item, x => x.Image, new { la = "", @class = "img-circle", alt = item.Image.Alt }, isEditable: true) Image renders fine, however…
0
votes
2 answers

How to Unit Test a GlassController Action without SitecoreContext Dependency Injection

I'm a sitecore developer, and I want to create a sample sitecore helix unit testing project for testing out the exact below Index() action method of our "HomeBottomContentController" controller, without any dependency injection into a constructor. …