Custom Field in Sitecore XP 8.0 Client - asp.net-mvc

I have to add a custom field ie. Drop List of country and auto populate the Drop List of cities on selection of respective country in Sitecore Client.
If possible we have to take the list of Countries and Cities from the Content Item.

There is nothing like this out of the box in Sitecore. What you need to do is to implement custom Sitecore field.
Short tutorials how to build one can be found:
https://sdn.sitecore.net/articles/api/creating%20a%20composite%20custom%20field/adding%20a%20custom%20field%20to%20sitecore%20client.aspx
http://www.sitecore.net/learn/blogs/best-practice-blogs/martin-knudsen/posts/2012/09/creating-a-custom-sitecore-field.aspx
And here you can find an answer how to build a custom field which uses one dropdown depending on another: Sitecore grouped droplist

Related

Orchard Localization and query with Current culture filter does not return item with no translation

I'm using Orchard CMS and I use localization part for my content types.
I also use ForCurrentCulture filter in queries to prepare cultured specific items for projection widgets and it works fine.
But the problem is that when I create a new item from a content type like news, after publishing it; the query doesn't return it until I click New Translation and save for one another language.
This bug occurs because the first created item does not belong to any language but this is not good. I think there should be a default culture for localization added content types.

Editable DropDownList in MVC

I have a list of items. I have to provide users an opportunity to edit those values. As I cannot efficiently handle it using textbox(generated dynamically), I was thinking to have dropdownlist which are editable.
Any suggestions?

searchable grid using knockout in mvc

I need solution for my problem on urgent basis, I am new with mvc, knockout please provide me sample code for my problem. any help will be highly appreciated.
suppose I have an observable array in my viewmodel i.e
var viewmodel = {
vendorproviders : ko.observablearray([])
}
where vendorproviders list consist of multiple attributes like id, name, country, address etc
I want to populate that array in my grid where each row will have a select button, when that button is clicked it should post the id to my controller action either by submitting or by ajax call.
Furthor more that grid should be searchable like if there is a separate text box, based on the value of text box grid should display matching providers else display all providers.
when user search for particular provider grid should populate from observable array instead of making call at server again and again to pupulate the observable array.
I would suggest starting here.
http://learn.knockoutjs.com/#/?tutorial=intro
What you are talking about is all the basic functionality of the tools you referenced.

How to display new created property value in Umbraco 5?

I just want to know on how do I get the value of a property in umbraco 5..
in version 4.7 node.GetProperty("PropertyAlias").value
now. how do i use this in 5?
Thanks..
If you're editing a view, and you want to display a field from the current page's content, you can do so dynamically:
#CurrentPage.PropertyAlias
If you're editing a view, but the current page is not representative of the model, or you need more advanced features you can retrieve properties using the Field method:
#Umbraco.Field(Model, "PropertyAlias")
Finally, If you've selected a content node in code:
MyContent.Field<string>("PropertyAlias")

Asp.NET MVC 2 dynamic editor template based on dropdown value

I am working on a model criteria builder. I have a dropdown list with all of the model properties, a dropdown list with static operators (less than, equals, like, etc) and a user input form element for the value. The issue is that the form element type (dropdown, date, text box, etc) for the user input value needs to be based on the data type of the model property chosen in the first dropdown list. What is the best way to achieve this using MVC 2? Ideally I would like to just create an Html extension method and use it like Html.CriteriaFilterFor(model => model) and be able to customize the display using model attributes and metadata.
You should use JQuery to populate the other one. An AJAX call would allow you to pull the second drop down's list. Populating Dropdownlist Using MVC2 Based On Another Dropdownlist (Cascading DropDownList)

Resources