Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdowns and checkboxes #118

Open
geo782 opened this issue Mar 5, 2019 · 4 comments
Open

Dropdowns and checkboxes #118

geo782 opened this issue Mar 5, 2019 · 4 comments

Comments

@geo782
Copy link

geo782 commented Mar 5, 2019

Hi,
Im using umbraco 7.13.2 and Vorto 1.7.1. and im trying to use vorto with dropdown and checkbox without success. textstring and textarea works fine. What i do is, go to developer > Datatypes, New datatype, Select vorto and then dropdown (or checkbox) and save. Then in document type, add the new field.
The problem is that I dont see any field to add the dropdown values. The same happens for checkbox.
If i add the original dropdown, there is a field "Add prevalue" to add, remove or sort values for the list.
Any idea why this happens?

@mattbrailsford
Copy link
Collaborator

@geo782 vorto wraps existing data types so you don't configured the wrapped data type from within vorto, you configure it via it's own data type prevalue editor. Vorto then reuses that data type definition. So, to set the dropdown prevalues, you do it on the dropdown data type that vorto is wrapping.

@geo782
Copy link
Author

geo782 commented Mar 6, 2019

@mattbrailsford thanks for the reply. I created a dropdown and then selected it in new vorto.
Im now trying to display the dropdown value for each record, witout success. my code is :

 <ul>
                                        	@foreach(var item in selection){
                                        	    IPublishedContent sitem= (IPublishedContent)item;
                                        		<li>
                                        			<div class="accordion accordion-block">
                                                                    <div class="accord-btn"><h4>@sitem.GetVortoValue("articletitle")- @sitem.GetVortoValue("faqCategory")</h4></div>   
                                        		                    <div class="accord-content">
                                                                        <p>@sitem.GetVortoValue("body")</p>
                                                                    </div>   
                                                    </div>
                                        		</li>
                                        		
                                        	}
                                        </ul>

In the frontend i get the text System.String[] instead of faqCategory value.

@mattbrailsford
Copy link
Collaborator

@geo782 can you reformat you code snippet please? I can't understand what it's doing. Please see https://help.github.com/en/articles/creating-and-highlighting-code-blocks for details on how.

@geo782
Copy link
Author

geo782 commented Mar 6, 2019

@mattbrailsford sorry i eddited the code, now its ok.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants