Questions tagged [presentation]

Questions related to Sitecore presentation components: layouts, sublayouts, renderings, presentation details, etc.

Filter by
Sorted by
Tagged with
5
votes
1answer
288 views

Force controller rendering in head of page to render after other renderings

I know that MVC and by definition Sitecore MVC renders components from top to bottom order, but is there any way to force (hack) a controller rendering (which is used in the head of the page) to be ...
0
votes
1answer
78 views

JSS deploy vueJs - then I need to manually Unprotect Layout to add my placeholders

Currently, each time I'm doing deploying jss using jss deploy package -c -d I need to manually unprotect the Item of my App Layout to include my placeholders. Any ideas how to stop this? Thanks
2
votes
2answers
1k views

How to add rendering at a position programmatically?

Following this article, I managed to achieve adding a rendering programmatically. But it will add the new rendering, always at the last position. Is it possible to add it at a particular index/...
3
votes
3answers
219 views

How to create new layout on Sitecore CM server and sync it to Sitecore CD server in Azure Cloud

I'm a newbie on Sitecore. I'm studying the "Get Started" tutorial from Sitecore e-learning website. I have configured Sitecore 9 on Azure, from Azure marketplace, using extra-small sizing having 2 ...
1
vote
1answer
353 views

How to pass data between renderings in sitecore 9.0.1?

For passing data between renderings I have seen this blog. Here they use below method to set data: ContextService.Get().GetCurrent().ViewData.Add("_SharedModel", viewModel); In Sitecore 9.0.1 I ...
0
votes
1answer
257 views

Sitecore Forms Submit Action redirect to a PDF in Media Library

I have a form that, upon submission, should redirect and display a PDF from my media library. Upon submission, I am receiving this error: Does Sitecore 9 Forms require that I provide a layout file ...
0
votes
1answer
843 views

How to get rendering parameters based on Rendering ID

I have a search results listing page where every search results are being updated using AJAX. I set a few rendering parameters like the number of results per page on the rendering because they need to ...
0
votes
1answer
519 views

Sitecore Edit Frame issue

I am having issues when passing Guid as the data source for edit Frame. When I populate the Guid directly it works fine but while binding it from model am getting an error message Code: @using ...
0
votes
1answer
851 views

Programatically render nested renderings/placeholders from an item [duplicate]

I am working on programatically rendering an item to html in code. I found this question https://sitecore.stackexchange.com/a/6256/1133 which almost serves the purpose of my request, except it isn't ...
1
vote
2answers
756 views

Failed to execute datasource query System.NullReferenceException while setting Datasource on Rendering

Has anyone seen this error before or know how to solve it? 996 16:35:46 WARN Failed to execute datasource query System.NullReferenceException: Object reference not set to an instance of an ...
0
votes
1answer
683 views

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel' but this dictionary requires a model item of type

While accessing the link on website got the below error. Description: An unhandled exception occurred. Exception Details: System.InvalidOperationException: The model item passed into the ...
2
votes
0answers
362 views

CreateCyclePreventer throwing NullReferenceException with final rendering details

I'm running into a weird issue with Sitecore 8.2 Update-6 where after I modify an item (with MVC controls) using the Sitecore Experience Editor I start getting NullReferenceExceptions when I view the ...
1
vote
2answers
243 views

SXA What are the benefits of using rendering variants over simple rendering parameters

From what I can tell, rendering variants are a way to support alternate presentations of a single component. What are the benefits of rendering variants over creating a custom rendering parameters ...
2
votes
2answers
422 views

What are Composite Renderings/Components in SXA

What are composite components or renderings in SXA? (I'm looking for answers describing the inner workings, ideally). I have read about SXA composite components and SXA composite renderings. From ...
4
votes
2answers
612 views

System XML exception for rendering after upgrade

We recently upgraded to Sitecore 9.0 Update-1 from Sitecore 8.2 update 2. When accessing one of the pages in Experience Editor, we get the following error for one of the renderings used for page ...
0
votes
1answer
781 views

Reset presentation detail is using Standard values from wrong / old template

I'm trying to migrate a Sitecore page to use a new template with new presentation details in it's Standard values. This template inherits from the currently used template. When I change the page to ...
2
votes
1answer
300 views

What is purpose of the Controllers folder in Layouts?

I've noticed that in /sitecore/layout there is a Controllers folder (first item underneath actually). In that folder you can add items of type Controller. These items have fields for a controller name ...
4
votes
1answer
94 views

Reusable HTML components in third party applications

I have a requirement where in the header and footer of the application can be reused in a third party application to give consistency to multiple application. In Sitecore usually we create header and ...
0
votes
1answer
1k views

Selection of Global or Local Data source in presentation details

Selection of Data Sources in Presentation Details : There are two data sources for the footer component , one at the local repository level and another in the Global Content level. While choosing ...
7
votes
2answers
348 views

Implement personalization on component level

I have a personalization scenario in which we want to change a component (button label) based on a triggered goal. Not very difficult you would think, but the component exists on all pages. It's ...
2
votes
1answer
291 views

Content not displayed on mobile

I'm currently designing a website in SXA. I've encountered an issue wherein the contents of a Tab is appearing in Desktop, but not in Mobile. Inspecting the mobile markup, only the texts in the tab is ...
4
votes
2answers
209 views

What does the parameters object do in the ItemRendering method?

Method definition: public virtual HtmlString ItemRendering(Item item, object parameters); Assumed usage: @Html.Sitecore().ItemRendering( item, new { ThisShouldWork = true } ); Assumed Consumption: ...
6
votes
1answer
210 views

Controlling Layout / Device Layout by culture

I heard it is possible to control your device layout by which culture you are in. I can not find any documentation or examples on this. I see that you can choose a device layout by QueryString or ...
9
votes
0answers
154 views

A rendering snippets in Web Forms

I would like to add a rendering that also has some other rendering added to its own place holder ahead of time. An example is to add a striped rendering and place a 1 column grid rendering in the ...
4
votes
1answer
366 views

Dynamic content in body copy based on url parameter

A newbie question please: I have a URL: www.example.com/?location=London I want to change a part of the title, headline and body text from the default value (UK) to the supplied value (say London). ...
0
votes
0answers
24 views

Restrict number of Components on Page [duplicate]

We need to enforce a rule where a specific component can only come once on specific Page template. Can some body guide me how do I implement this we are using Sitecore 8.2 Update 2. Is there any out ...
3
votes
3answers
676 views

View Renderings at run-time

I need to load renderings and assign Datasource at run-time. We have two kind of renderings; Controller Rendering and View Rendering and am using this inbuilt function: @Html.Sitecore().Rendering ...
2
votes
1answer
310 views

NullReferenceError for Html.Sitecore().Rendering in Ajax Calls

I need to update page renderings based on search results using ajax call. I have written a method to get rendering collection based on filter and when I call Html.Sitecore().Rendering via loop in view ...
1
vote
0answers
160 views

Adding placeholder settings to presentation details of many items

I have to add a bunch of placeholder settings to a bunch of items. These items already have specific presentation details, so not using the standard values. I tried to add them to standard values, ...
4
votes
1answer
335 views

Sitecore Renderings Sorting [closed]

We have complex requirement where we want to sort the renderings at run time based on Filters For example : Assume that we have controller renderings say BC1,BC2,BC3,BC4 in sequence mentioned. Now ...
2
votes
0answers
90 views

Saving presentation details kills browser

I'm having issue with saving presentation details on standard values for a template. I navigate to the template and standard values I'd like to edit in content editor, I open presentation details ...
1
vote
1answer
523 views

How to get context rendering in web forms

Does anyone know how to get a context rendering in Sitecore Web Forms? There is a RenderingContext.Current.Rendering in the Sitecore MVC, but I can't seem to find the same for Web Forms
1
vote
1answer
251 views

Rendering inheritance in sitecore [duplicate]

I have a data template article which inherit another data template Metadata. I have applied a rendering to standard value of template Metadata to render metadata on the page where it is inherited. ...
1
vote
1answer
282 views

Can't lock and edit, can't edit layout even as admin

Suddenly the button for Edit is not displayed anymore and I can't edit the layout, I can edit the fields for the item but I need to edit the layout to actually see something, any ideas of what is ...
2
votes
1answer
85 views

Layout switcher is not available

Probably some one knows why the Layout Switcher in the Experience Editor mode can be disabled and I can't manage the Shared Layout? I want to manage the shared layout for my branch template. I ...
7
votes
1answer
979 views

Updating Presentation details and Template Inheritance (Rendering Inheritance)

I am using the Sitecore 8.2 I have a template T1 which has rendering R1 set on its Standard Values (set a long time ago, maybe at the age of Sitecore 7 or earlier). There is a set of templates T2, ...
1
vote
1answer
155 views

Error Loading Glass view statically

The model item passed into the dictionary is of type 'Sitecore.Mvc.Presentation.RenderingModel', but this dictionary requires a model item of type 'xxx.models.Sitecore.IPage'. I get above error if I ...
5
votes
2answers
761 views

How can I programmatically list all personalization in my page?

I am trying to get all personalization set in a given page from a RenderingController context. Any idea? public ActionResult GetPersonalizationRule() { var contextItem = Sitecore.Context.Item; ...
5
votes
1answer
417 views

Code to determine if a specific component is already on page

Issue: I want to add two accordion components to one page. The IDs are the same so both of the components will not work. My Proposed Solution: Using MVC, add code to the component that will check if ...
10
votes
2answers
4k views

Is it possible to get page rendering result programmatically ?

I need to get all HTML page content that sitecore generate for an page item. But I need to do it programmatically just for some special tests. I can of course just use URL but it is not good for me. ...
1
vote
1answer
318 views

Rendering Parameters not honoring sections

Version Sitecore 8.1 Update 3 Issue I have created rendering templates that are composed of several base templates. Its actually a single template for each column in this case. ...
2
votes
1answer
217 views

Edit rendering parameter data from a rendering toolbar

I would like to update some data on my rendering parameter template from the rendering toolbar. Like when I click a custom experience button, I could set my vertical alignment field, on the rendering'...
14
votes
1answer
441 views

Publishing restrictions for components in page

I have a page that is completely component based. All images, html, etc are individual components with datasources in a grid system. The datasources are in a folder under the page called pagedata or ...
2
votes
2answers
597 views

Cannot setup content for same control multiple times in a page created using a template in sitecore 7.5

I'm trying to use the same control (MVC ControllerRendering) multiple times in a page type template, similar to www.launchsitecore.net/.../binding-content-and-presentation (please check Fixed Toolbar ...
1
vote
1answer
576 views

Component Definition item

What is the core usage of a Component Definition item? Is it used to store the rendering parameters of the component? Or does it allow the component to be added to a placeholder? Or Both?
4
votes
1answer
563 views

Difference between “Component definition item” and “Components or Rendering”?

What is the difference between "Component definition item" and "Components or Rendering" in Sitecore?
0
votes
1answer
214 views

VisitorIdentification is empty

I want to get the VisitorIdentification html string in my C# code. So I do the following: var viewContext = Sitecore.Mvc.Common.ContextService.Get().GetCurrent<ViewContext>(); var htmlHelper = ...
2
votes
1answer
1k views

Getting generic link's friendly url from rendering parameters

I have a rendering parameter template with a generic link field, now I want to get the friendly url (No glass mapper in this project), is there a way to convert rendering parameters to fields based on ...
6
votes
2answers
252 views

Remove access to Shared presentation?

I am trying to remove access to shared presentation for a particular role. I have denied read on this item: /sitecore/content/Applications/WebEdit/Ribbons/Chunks/Layout Modes/Shared Layout. This ...
3
votes
1answer
323 views

Access to both Experience Profile and Presentation Details

I have a user that needs access to both Experience Profile and Presentation Details. We found a Sitecore KB reference (https://kb.sitecore.net/articles/820320) that stated if a user had the Author or ...