Sitecore Placeholder Setting - sitecore

Do I really have to set Placeholder Settings for rendering items in Presentation Detail??
I have many placeholder settings (without adding into Presentation Detail) and I can see empty placeholders areas (gray-box) without any problem. Then, I can choose assigned rendering items from the selected empty placeholder.
However, whenever I update files in "/App_Config" or "/bin" folder, all empty placeholder areas are disappeared (No gray-box) if the placeholder setting was not added into Presentation Detail. So, in Content Editor, I go to placeholder setting items which have the issue, then edit and save again and refresh the xEditor page. Now, the saved Placeholder Setting item appears.
What is the problem??? When App Pool recycles, is there something removing placeholder thing?? I have no idea...
I'm using Sitecore 8.0 and dynamic binding like #Html.Sitecore().Placeholder("Placeholder Key Name")

Related

How to make a statically binded rendering editable via Experience Editor (Sitecore MVC)

So I have a layout view within Sitecore Mvc, this view contained a Controller Rendering that pulls in a header and footer navigation. Example:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering")
This specifies a Controller Rendering I've defined in Sitecore. This works great, except when I'm in the experience editor. It doesn't give me the ability to select this rendering. If I create a Placeholder and then define these navigation elements to this placeholder dynamically via Sitecore, then I can, but these navigational elements exist on every page of this layout, so I would like them statically placed instead of using a Placeholder, but I would still like the user to be able to select the navigation element in the experience editor (so I can create custom command to interact with this navigation, such as creating new links, etc).
Does anyone have an idea that will help me achieve this?
Use Edit Frame for that and create Custom Edit Frame Button for operations like adding new element to the navigation.
And remember to pass Datarsource ID or Path as a second parameter to the Html.Sitecore().Rendering() method:
#Html.Sitecore().Rendering("/sitecore/layout/renderings/some_rendering", new { DataSource = "{some-id-or-path}" })
Here is set of blog posts which can help you to understand how Edit Frames work and how to add them in Sitecore MVC solution:
https://visionsincode.wordpress.com/2015/01/08/how-to-use-editframe-in-sitecore-mvc/
https://www.cmsbestpractices.com/how-to-properly-use-sitecore-edit-frames/
https://briancaos.wordpress.com/2011/11/28/using-sitecore-editframe-in-pageedit/
You won't be able to remove the component or move it around the page (yeah, it's statically bound to one place on your layout), but you will be able to edit it's properties and datasource.
You can try to use GlassMapper views and statically inherit the view from the GlassView.
Then you'll be able to use Editable method to render the field.
But the consideration you need to take is that you'll not be able to set a datasource to the component from the page editor or content editor.
Instead of injecting the rendering through the Rendering method you should be able to use standart MVC RenderPartial.
I've used this approach on one of the projects I've been on and it worked.

sitecore editframe button support multilanguage

I have been playing around with Editframe buttons in a Sitecore 8 for a multilingual project and I have the feeling that Edit Frame buttons do not work properly on sitecore multilingual sites.
Were you able to get it working edit frame buttons with a multilingual implementation?
Is it working out of the box or do you need any special configuration?
My experience is that when I am on a localized page and I click on an EditFrame button, it will open the default language Item instead of the localised item. I am of the impression that this is what happen when you click on Edit the Related Item in the Experience Editor.
I encountered your scenario very recently.
Were you able to get it working edit frame buttons with a multilingual implementation?
Yes, all the Fields I set up within the Edit Frame Buttons in the Core worked correctly with my Multilingual Site
Is it working out of the box or do you need any special configuration?
You need to add your Field Names into the Edit Frame Button Items in the Core database, found at the out-of-the-box path; /sitecore/content/Applications/WebEdit/Edit Frame Buttons/Default/Edit. Make sure your sc:Edit component references this path in the Buttons property
You may use different Display Names of the Fields for each of your languages for ease of use in the Content Editor / Experience Editor but as long as they are display Names it should be fine. If they are not and it doesn't work I recommend putting the Field Name for each language in the Edit Frame Item.
When I click on an EditFrame button, will it open the default language Item instead than the localised item, I am of the impression that this is what happen when you click on Edit The Related item as well
No, in both instances the Item will be loaded in the correct Language as well as when you create a new Datasource Item to be referenced by your Component.
The biggest issue that is present is when Edit the Relating Item and make changes to Rich Text Editor field or TreeEx field is that when you save it, it saves it to the default enlanguage, even creating a Language Version for it if it does not exist.
I have raised this issue with Sitecore Support and they are currently investigating. When they have a fix I'll update you with their solution.
EDIT
The Support Patch to resolve the issue Edit the Relating Item saving changes to the wrong language version of the Item can be found here - https://kb.sitecore.net/articles/814090

How to display a placeholder in all pages even though it is not configured to do so?

I have following placeholders in the layout
header-placeholder
top-back-placeholder
center-placeholder
bottom-back-placeholder
footer-placeholder
and following Items using the above layout
Home Item - Used to display Home page
Article Item - Used to display Article Page
Here the two back placeholders used in the above layout is used to display a back button in the top and bottom of the page(Here I will be configuring the same sublayout for two different placeholders to show the back buttons in top and bottom) but these back button should be shown only in Article page and not in Home Page.
So I am configuring accordingly for only Article Item(Using Presentation -> Details option) and not for Home Item.But However in the edit mode I am able to see an empty portion containg Back placeholders asking for Back Sublayouts in the top and bottom of the Home page, though I have not configured it in the Presentation->Details of the Home Item.
Please let me know the setting that I am missing which is showing the placeholders in the Home Page even though it is not configured to show.
You have set it up correctly, but seem to be a bit confused about placeholders versus sublayouts and renderings.
Placeholders are just areas that CAN be used to contain sublayouts and/or renderings. A placeholder can contain 0 or many sublayouts and renderings.
In your example:-
The placeholders still exist on the layout for the Home item. Without assigning a sublayout or rendering to that placeholder (as done on the Home item), nothing will fill that place on the page.
In edit mode (page editor mode I assume), you'll see the area for those placeholders with nothing in them, as Sitecore is just allowing you to place something in there if you want.
(i.e it's showing you that a placeholder is there for you to fill with a sublayout or rendering, but nothing is in it at the moment.)
If you'd like to remove the placeholder from the layout just for the home item, you could have some code-behind in the layout to do the following:-
Give the placeholder an ID (like topBackPlaceholder).
if (Sitecore.Context.Item.Paths.FullPath == Sitecore.Context.Site.RootPath)
{
topBackPlaceholder.Visible = false;
}

Cannot get a Sitecore form to display in a placeholder (Web Forms for Marketers module)

I'm busy writing a sitecore solution to manage a news site. I have a NewsArticleLayout (used to display a NewsArticle item), with a NewsArticleMailPlaceholder which I want to use to display a form where a user can enter a name and email address where a news article link must be mailed to.
On the NewsArticleLayout page is already a NewsArticleSublayout with a phNewsArticle placeholder, which is currently correctly displaying data related to a news article.
When I try to link the form to this placeholder, I only seem to be able to link to placeholders in sublayouts, not in layouts, so I created a MailNewsArticleSublayout, and placed a phMailNewsArticle placeholder on it. Then I told the form to display on the NewsArticleLayout, using the MailNewsArticleSublayout, and the phMailNewsArticle placeholder.
However, when I view the page, my form doesn't display. I've done a full publish of my entire Sitecore content tree, nothing seems to fix it.
I've even added a phEmail placeholder to the NewsArticleSublayout, and linked this to the form layout details, but this also doesn't display anything.
Have I correctly setup my form's layout? Is there something I'm missing here?
After speaking to sitecore support, I was able to resolve the issue. What I was missing was adding "Form" to the layout details on the standard values for my template. Then in this Form element, fill in the actual Form's location in the "FormID" field. After adding this, it worked perfectly.

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.