Questions tagged [presentation]

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

Filter by
Sorted by
Tagged with
4
votes
1answer
106 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 ...
9
votes
3answers
696 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
399 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
324 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
325 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 ...
10
votes
1answer
267 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
462 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
27 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
965 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 ...
3
votes
1answer
395 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
210 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
415 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
100 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
708 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
379 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
448 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
94 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 ...
8
votes
1answer
1k 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
217 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 ...
6
votes
5answers
1k 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
588 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
6k 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
412 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
329 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'...
13
votes
1answer
675 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
763 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
962 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
715 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
332 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
2k 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
382 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
400 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 ...
6
votes
2answers
1k views

Change the Order that Component Properties Display In

I have created a new rendering parameter to be used with a specific page layout. Everything is sync'd up but when I go to edit the Control Properties, my new section shows up below the "General" ...
0
votes
0answers
181 views

Component/Module placement issue in experience editor in Sitecore 8.1

We are facing very strange issue. On a page we have one Banner(B) and two Container module/component C1,C2 Here is sequence on page: B C1 C2 In Experience Editor when I add one Container module ...
7
votes
3answers
425 views

Yellow screen (YSOD) and unhelpful errors when trying to edit the renderings/presentation details on a page

I have a 8.0 site that just started having some problems whenever I try to edit the Renderings (both final and shared). I'm getting a yellow screen displaying as soon as I hit "Edit", as seen here: ...
2
votes
1answer
903 views

Is it possible to detect if a component was just added to the page in the Experience Editor?

I would like to show some message in my component in case this component was just added in the Experience Editor, but the item is not saved yet. Is there any way to do it?
0
votes
2answers
3k views

Get amount of components on final layout programmatically

I need to know how many components final layout has for each language programmatically. Is it any Sitecore API for it ?
12
votes
2answers
1k views

Force shared layout in experience editor

I know there's a button in experience editor to decide whether to use the shared layout or the final layout when adding renderings (and the default is final layout). Is there a setting that forces ...
4
votes
3answers
1k views

Different rendering parameters by language

I have a component rendering, which is added to the shared layout of the standard value of a page template. This page template has multiple language versions to have different values per language. Is ...
2
votes
1answer
211 views

Habitat - Renderings vs Sublayouts

All of the common CSHTML views in Habitat are in a folder called Sublayouts. https://github.com/Sitecore/Habitat/tree/master/src/Project/Common/code/Views/Common/Sublayouts However, I'd usually call ...
1
vote
1answer
554 views

How to trigger custom code when rendering is removed?

I would like to trigger some code when a rendering is removed - actually gone, so not before the change is saved (you never know if an editor changes it's mind after removal and doesn't save). I ...
3
votes
2answers
947 views

Change datasource in final layout through API

I am trying to add some code (after an item is created - but that is not relevant) that manipulates the layout fields. To be precise, I want to change the datasource of some renderings (based on a few ...
6
votes
1answer
3k views

What's the Placeholder field used for in a Rendering?

Within View Renderings and Controller Renderings (at least) there is a shared field within the Data section called Placeholder. What exactly is that field used for?
0
votes
2answers
3k views

Set relative datasource for rendering

I have a template configured for two devices. Each device has its own type of rendering, but they share the same data source item. Each instance of the page template will have the following structure ...
6
votes
2answers
733 views

Is it possible to limit Renderings so they can only be placed once on a page?

I'm using Sitecore 8.1 rev. 151207 - And I have that rendering which only should be placed once on a page. Is it possible to limit that in terms of letting the user not add another one of the same ...
1
vote
0answers
422 views

Remove Child Renderings From Layout

I'm trying to determine the feasibility and effort for a client request. When a rendering is removed from a layout via the presentation details, they want all child renderings to also be removed to ...
4
votes
2answers
1k views

Custom rendering datasource syntax without breaking experience editor

I'd like to be able to use a custom datasource syntax for renderings and sublayouts. In particular I'd like to be able to handle custom prefixes for various different usages. The main one being site-...
1
vote
1answer
440 views

Disable editing on rendering in pipeline

I created a composite components control for Web Forms. I accomplished it by overriding the RenderLayout pipeline processor Sitecore.Pipelines.RenderLayout.InsertRenderings. The issue I have is that I ...
1
vote
1answer
409 views

Can I access component/placeholder hierarchy from a `getPlaceholderRenderings` processor?

Our solution is using dynamic placeholders. We have a requirement to restrict what renderings can be inserted in the page content (under the content placeholder) and in the sidebar (placeholder right-...