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
4
votes
2 answers

Sitecore 8 Editable fields with Glass Mapper

For some reason Visual Studio Gives me this error in the view: Cannot convert lambda expression to type 'System.Linq.Expressions.Expression>' because it is not a delegate type Also, I do not have intellisense on the lambda. I made sure to…
MikeD
  • 251
  • 2
  • 10
4
votes
3 answers

Sitecore TDS Code generation Error

I am trying to generate code from TDS code Generation by following GlassTutorial24 TDS version: 5.1.0.3, visual studio 2012. The generated class only has "ErrorGeneratingOutput". My project properties as below: Edit 1: Error while building: Error…
Dheeraj Palagiri
  • 1,829
  • 3
  • 23
  • 46
4
votes
2 answers

Is it possible to use queries as a data source for a Sitecore rendering with Glass Mapper?

I am building a site with Sitecore 7.5 and Glass Mapper 3.2.3. When I add a sublayout to the presentation details of a page, Glass Mapper will assume that the data source for the sublayout should be the current page. I can also explicitly set the…
Corey Burnett
  • 7,312
  • 10
  • 56
  • 93
4
votes
1 answer

Could not resolve type name: Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc

I am trying to use Glass Mapper in my MVC - v4.0.30319 project in Sitecore - 7.1. Following are my Glass Mapper version which I have installed Glass Mapper version - 3.0.10.23 Glass.Mapper.Sc version - 3.2.0.39 Glass.Mapper.Sc.Mvc version -…
4
votes
0 answers

Saving a form post in Sitecore MVC generates a "method not found" error

Has anyone else run into such an error? It would be great if anyone can suggest a way to examine this further or maybe has a direction for a solution. I have tried to debug this but could not figure it out. The action specified in the cshtml file is…
4
votes
3 answers

Check Glass Mapper V3 types at runtime

Using Glass Mapper V3, is it possible to check whether a Sitecore item supports a specific Glass Mapper class/interface? Given these classes [SitecoreType] public partial interface IPage : IGlassBase { // ... some properties here…
Dan Sinclair
  • 907
  • 1
  • 9
  • 27
4
votes
1 answer

How to extend Glass.Mapper.Sc.Fields.Image with additional properties?

I am storing cropping information on my Sitecore Media Library images in a field that was added to the /sitecore/templates/System/Media/Unversioned/Image template. I would like to access this field along with all of the other properties that exist…
Derek Hunziker
  • 12,996
  • 4
  • 57
  • 105
3
votes
2 answers

Unit Testing Using Sitecore.FakeDb Throws Sitecore.Nexus instantiation error on GetItem

I'm a sitecore developer and I want to use Sitecore.FakeDb in my unit testing. I have the following code: [TestClass] public class UnitTest1 { [TestMethod] public void Test_ArticleController_With_SitecoreItem() { …
user3034243
  • 145
  • 1
  • 9
3
votes
2 answers

How to Unit Test a GlassController Action which Returns a View Taking a Model

I'm a sitecore developer and I want to create a sample sitecore helix unit testing project for testing out our "HomeBottomContentController" controller: public class HomeBottomContentController : GlassController { private readonly…
user3034243
  • 145
  • 1
  • 9
3
votes
2 answers

Glass Mapper not mapping some item properties

(I'm using Sitecore 8.1 Update 3 with Glass Mapper.Sc version 4.1.1.66) I've run into an issue where some of the properties of a Sitecore item are not being populated in code through Glass Mapper. The values in our Content Base item (Id, Name,…
Chris Weiss
  • 131
  • 3
3
votes
1 answer

How to get null value instead of empty string with Glass Mapper?

I would like to get null value instead of empty string for 'Single-Line Text' field type with Glass Mapper. I need to recognize if any value was set or if a field was reseted to default state (and I expect there is no value - null). Do you know if…
Lukas Dvorak
  • 481
  • 4
  • 15
3
votes
1 answer

Clearing Sitecore link field rendered with Glass.Mapper.Sc BeginRenderLink removes wrapped fields

We're using Sitecore 8.0 Update 3 with Glass.Mapper.Sc 4.1.0.64 and are having an issue in the Experience Editor with Images which are wrapped within a Link. In our View Rendering, we've got: @using (Html.Glass().BeginRenderLink(x => x.ImageLink,…
Steve
  • 1,618
  • 3
  • 17
  • 30
3
votes
1 answer

GlassMapper Datasource and current item

I am using GetDataSourceItem Method from glass mapper to return my datasource item to the view, I debug the code when the datasource is empty the calloutModel in controller will be null, but from the view, model will not be null, it will have the…
Ayman Barhoum
  • 1,255
  • 1
  • 16
  • 31
3
votes
2 answers

Exclude templates from Sitecore TDS Code Generation

Is there a clean way to exclude Sitecore templates from the TDS code generation? We have to add all Sitecore templates to TDS because we exchange them with other developer.
Florian Sc
  • 102
  • 6
1 2
3
20 21