Sitecore Component Properties Rendering Droplist as Text - sitecore

I have a component that I've added a parameters template to. The parameters template has a Droplist field called VerticalAlign1. Its source is set to a folder with three items, bottom, center, and top. Now, in Visual Studio, the dropdown is rendered correctly:
However, when one opens up the component properties in the page editor, the following is seen:
It is simply a text box that gives the content editor no information about what the options may be. Is it possible to have this render as a dropdown?
We're on Sitecore 7.2 MVC.

Comment converted into an answer
In most of the scenarios, the problem is with Raw values checkbox being checked.
It changes all the custom field editors into text boxes. That's why you don't see a dropdown list.

Related

How to show "edit image" in Sitecore experience editor?

In sitecore "content editor" we can use the "image editor" by clicking "edit image" in the data section, but in the experience editor it is not visible.
is there a way to make available for editors to use the image editor? or this behavior is a sitecore standard?
thanks for help
Picture field
I've just written it up in a blog post.
First you'll need to add a new button under
/sitecore/system/Field types/Simple Types/Image/WebEdit Buttons
You can duplicate one of the existing ones and change the icon and text yourself. Make the contents of the Click field:
chrome:field:editcontrol({command:"webedit:changeimage"})
(there's already a webedit:editimage so we can't name it that).
Open App_Config\Include\Sitecore.ExperienceEditor.config and duplicate the entry for webedit:chooseimage. Change the command name to webedit:changeimage as per above. Then change the type to the class you will create below.
If you have access to a decompiler, take a look at the existing command Sitecore.Shell.Framework.Commands.Shell.EditImage as well as the existing command
for selecting an image in Experience Editor Sitecore.Shell.Applications.WebEdit.Commands.ChooseImage. You'll see that they're similar, but unfortunately they use two different
methods of opening a dialog (Windows.RunApplication and SheerResponse.ShowModalDialog) so we can't reuse the existing class as-is. I have created a class that uses a bit of both (link below).
Create your class (eg. EditImage.cs), make it serializable and inherit from WebEditImageCommand like the other EE buttons. I have posted the full class as a gist for you.
When you select an image in the Experience Editor, you should now have an extra button in the list which opens the image editor in a modal window when clicked.
You need to do next steps, is not the most elegant way but you can do it:
In the Experience Editor, click the image that you want to edit, and in the floating toolbar that appears, click More and then Edit the related item. This opens the item in the Content Editor, from where you can scroll to the field that contains the image and click Edit image.

Sitecore Placeholder Setting

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")

Add a custom dropdown list in Sitecore PageEditor

How can a custom dropdown list be added to the page editor in Sitecore?
I understand that you can create individual buttons in the toolbar by creating items under /sitecore/content/Applications/WebEdit/Custom Experience Buttons in the core DB using the WebEdit Button template and I understand that setting a button's Type field to Common will make it appear under the 'More' dropdown, but what I want is to create my own dropdown button with a unique list of buttons (corresponding to items in the master DB).
I've looked at the various processors in the <getChromeData> pipeline using dotPeek and suspect I will have to create a new processor in this pipeline, but I cannot find the relevant code which produces the 'More' dropdown list from the image.
Create a button of template type /sitecore/templates/System/WebEdit/WebEdit Button and set Type field to Common from the droplist. The button should then appear in the dropdown.

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;
}

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.