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

How to Unit Test a GlassController Action which Uses Sitecore.Context.Item

I'm a sitecore developer and I want to create a sample sitecore helix unit testing project for testing out the logic you see in our "ArticleController" controller's Index() action method: public class ArticleController : GlassController { public…
user3034243
  • 145
  • 1
  • 9
0
votes
1 answer

Filter in Sitecore Children in Sitecore

I have this tree structure: Page1 PageA PageX PageY PageB Page2 I want Page1 and Page2 as well as all child pages. I have created two classes. In one class using sitecore query [SitecoreQuery("../*[@@templateid={GUID}]", IsRelative =…
Swati Gupta
  • 753
  • 2
  • 8
  • 30
0
votes
3 answers

Sitecore GlassMapper MVC add standard fields to model

I need the sort order of my item in a specific model. I have tried it like this but no luck: [SitecoreField("__Sortorder")] public string SortOrder { get; set; } Any idea how I can include standard fields in my model? If this is not possible,…
Bgl86
  • 727
  • 8
  • 20
0
votes
2 answers

The controller for path '/api/sitecore/TestForms/TestFormsAPI' was not found or does not implement IController

I am creating a controller and inheriting GlassController, I am trying to call controller action method using ajax and the URL requested is '/api/sitecore/TestForms/TestFormsAPI' and it throws an exception saying "The controller for path…
Akhil
  • 165
  • 1
  • 13
0
votes
1 answer

Sitecore GlassMapper with Helix

We need to make choice between Sitecore Extensions and Glass Mapper along with T4 to get the Data for Sitecore Items for our project. Can you guys help me challenges you face using Glass Mapper when you use GlassMapper for first time I know its…
user2332873
  • 2,569
  • 3
  • 13
  • 7
0
votes
1 answer

Sitecore 8.2 Glass Mapper Create item error

We have recently upgraded our project to run on Sitecore 8.2, Rev3, as part of the upgrade we had to update Glass Mapper which is now running on version 4.3.4.197. However, we are now getting an error when trying to create an item: var…
Igor
  • 115
  • 1
  • 2
  • 10
0
votes
2 answers

Resolve ISitecoreService using SimpleInjector

ISitecoreService accepts database name as a string parameter in its constructor (web or master) ISitecoreService service = new SitecoreService("master"); //or ISitecoreService service = new SitecoreService("web"); Is it possible I dynamically send…
AfshinZavvar
  • 722
  • 1
  • 10
  • 21
0
votes
1 answer

Model binding not working properly for Sitecore.Data.ID type while submitting through a Form

I am experiencing a model binding problem, My id is of type Sitecore.Data.ID. After submitting the form, all the other fields gets bonded with correct data, however my Id gets changed to something else. For example, in the form, the value for hidden…
0
votes
2 answers

Sitecore return dependant drop down list

I have the following set up in my CMS Under ContactUsPageSettings I have some items that are using a template called ContactUsQuestionsOption and then below that I have some items that are using a template called ContactUsSubQuestionOption. I want…
gadgetgem
  • 63
  • 11
0
votes
1 answer

Glass Mapper - "The given key was not present in dictionary"

We're trying to configure Glass Mapper for our Sitecore 6.6 instance but came across this error when testing it out. [KeyNotFoundException: The given key was not present in the dictionary.] …
Bauza23
  • 191
  • 3
  • 18
0
votes
2 answers

Sitecore, wrong type of inherited template field created by TDS

I have a problem with template inheritance: I have base template (let say Parent) which contains the following field: Theme (Droplist with query specified) And template (Child) derived from it. The issue is that once I inherited Parent, and…
Nicolai
  • 1,907
  • 1
  • 23
  • 31
0
votes
2 answers

Glass Mapper Droplink Show Name instead of Guid

I'm using glass mapper and my template has a droplink list in it. When i attempt to retreive the item, it's bringing back the selected guid in the droplink instead of the name. How do I go about showing the name selected in the droplink versus the…
0
votes
1 answer

RenderLink is hidden in experience editor mode

We are on sitecore 8.1 update 3 and Glass Mapper 4.2.1.188. Render Link works on normal mode, but we look at same link in experience mode its hidden? Razor Code:
@RenderLink(x => x.CallToActionButton, new { @class =…
Dheeraj Palagiri
  • 1,829
  • 3
  • 23
  • 46
0
votes
2 answers

RenderLink returns "Empty String " in Glass.Mapper

I'm trying to show a title of a news as a link @using Glass.Mapper.Sc.Web.Mvc @model MVC.com.Models.News it works:@Model.Title
it dosen't work : @Html.Glass().RenderLink(x => x.Url,new {@class=""} ,true,…
AfshinZavvar
  • 722
  • 1
  • 10
  • 21
0
votes
1 answer

Error when upgrading glass mapper

Currently i have glass mapper v3 and in process of upgrading to latest glass mapper i.e. v4, however when i build the project its giving me following error. Severity Code Description Project File Line Suppression State Error CS1705 …
CodeBox
  • 446
  • 4
  • 19