How to find which items uses a particular layout - sitecore

Is there a way in Sitecore to see if/which items uses a particular layout. I would like to change a layout but cannot find a way to see which items will be impacted by the change.

You could go to the layout item in Sitecore under for example '/sitecore/layout/Layouts/customername/page/standard layout'. Then you could open the references tab by opening the 'navigate' ribbon on top and selecting the arrow next to 'Links'. You will see a dropdown with the referers in it, which makes it easy to see what items depend on the layout.
Good luck!

Related

Specify order of slides in carousel?

Is there a way to control the order of slides displayed to users in a carousel from the Experience Editor perspective? (or even the Content Editor)
Basically, based on the user that has been identified or not identified, I would like to display a different slide as the first slide of the carousel. All the other slides would still be present, just in a different, specified order.
Is there a way to accomplish this via rules or should I look at having to create separate datasources that have the different slide orders already specified?
TL;DR
Personalization can do three things:
vary a datasource for a rendering
vary a rendering (use another rendering basically)
hide a rendering.
I guess the question you need to answer is whether what you need can be accomplished by doing either one of these actions.
If you've used nested structures to represent your carousel (like we do in SCORE, you can see how it looks like here or here) it's not hard to show/hide certain panels based on personalization conditions and thus reorder the carousel. Depending on how exactly it looks on the published site you may only need to repoint datasources. Either way, it's personalization out of the box and your content structures working nicely together.
If you've used a (variation of a) MultiList field to represent a list of your panels with panels themselves being items somewhere in the shared content area it's not something personalization engine can change based on a condition. Changing a field value is, unfortunately, not on the menu. I am sure you can code around it thanks to Sitecore being so open and flexible but I am not sure you can make it seamless (e.g. variations preview in Page Editor).
Rendering parameters is also not something you can change but if yours are static and defined on the rendering definition item (as opposed to being supplied when component is bound to the placeholder and thus recorded inside the presentation details) you can get away with having two definition items for your carousel component (same code behind it) and picking the right one based on the personalization condition.
Hope it helps.

Identify page nodes that have specific layout controller

I would like to search all pages that have a specific(based on GUID) layout controller node. Is there a way to do this in Sitecore?
I am hoping to avoid going through all the page nodes and identifying the layout controller via the presentation detail. This would be a tedious tasks if I have to do so.
You can also go to the layout in sitecore and click on the "Navigate" ribbon and use the "Links" menu option. The Referrers are the items that use the layout.
You can use the Development Center for it.
Go to the Sitecore Menu -> Development Tools -> Developer Center
Then, Select Tools -> XPath Builder.
The query you need is like this:
/sitecore/content//*[contains(#__Renderings, '{A5437488-E6FA-42D3-B201-25D3CFE0A02B}')]
Find all items that contain a specific id on the __Renderings field.
The __Renderings is a field like any other. It stores the information about the layou, devices and renderings. That said, you can use Sitecore queries to find items based on it. See:

Sitecore personalisation - DropLink

Not fully used personalisaiton yet, so have what I hope is an easy question.
My page is setup where users can use a droplink to pick content for 3 "slots" on the homepage, from a "bucket" of available content items that can appear.
I want to use a "rule" to show different items in each slot, depending on if the rule is met or not, but I can't seem to work out where I set this.
Right now, my page editor view is broken (currently have an open ticket with Sitecore for work out why this is), so I am hoping this can be done from the content editor.
I have already ticked the "Show the Personalization Section" under Application Options.
This sounds like a conditional rendering rule that you're wanting to create. If that is the case, unless you want to apply the rule to ALL renderings (which I wouldn't recommend), you would create the rule under
System -> Marketing Center -> Personalization -> Rules. Here you can set up a conditional rendering rule that will check conditions and then do something. Since this is going to apply to presentation, the actions are limited. Mostly to presentation.
Now to apply that, you go to the layout details on the item or the standard values for the item template. When you click on the rendering (like you would to set a data source), it brings you to the edit screen and you should be able to scroll down to the Personalization section. If your rule is not in the list, then it's most likely in the wrong place. Anyway, if it's there, you simply put a check next to that box and it will now apply that rule when figuring out the layout details when the item is rendered.

sitecore page editor change position actually deleting sublayout added on an item(Page)

I have a layout with two place holders leftColumn and rightColumn. For an item i am adding multiple sublayouts for leftcolumn and multiple sublayouts for rightcolumn. Now in page editor when i am trying to change position using "Change Position" button in toolbar and move content to another location, content is getting moved to my new location as desired. But when i click Save button on Ribbon, it is actually deleting moved content from presentation itself.
I am not sure why it is behaving like this. we are using Sitecore 6.4
We opened a ticket with Sitecore and found out that this is an existing bug. They do not support movement of multiple controls/sublayouts within same placeholder on layout using PageEditor. We need to use multiple placeholder on layout and then we can change position of controls from one placeholder to another one.
Can you see anything through Sitecore Logs? It may have any errors or exceptions that are being generated.

Adding buttons for HTML elements to the Sitecore rich text editor

I would like to add a button to the Sitecore rich text editor toolbar, specifically one that inserts the H2 element.
I know the H2 element can be inserted using the paragraph styles pulldown menu, but all my editors are now using the bold button for their headings because they don't "see" the paragraph styles pulldown. So, I want to make the H2 easily available using a toolbar button. (And maybe even removing the bold buttons, since it's not semantic at all.)
But no matter how I go through the documentation, I cannot find a good explanation on how to do this.
In addition to the guide Yan posted, here's another guide.
I found a couple of walkthroughs for this...
Sitecore v6.3 and previous: link
Sitecore v6.4: link
Make sure that you select the core database (bottom right of Sitecore desktop) so that you can see the /sitecore/system/Settings/Html Editor Profiles area.
In my article here the first step of wiring up an event to a button is in javascript. From there you can insert text or tags. You can also get the selected text and wrap it in tags. You don't need to compile anything I was just showing how you would if you needed to, but you can entirely cut that piece out and just use the editor to send whatever text you want back to the wysiwyg editor.