See my blog here:
http://lundp.de/de/blog (at the moment only in german, because itÄs still work in process).
What I want:
User should type in a search word, lets say "umbraco". When "umbraco" is typed in I want that all articles are displayed if tag, title, author include the word "umbraco".
My problem at the moment is:
How do I get the value out of the search input? And how should my razor code look like to display the articles properly?
tried that but couldn't get it to work (see comment under the article).
Is there no simple way to get the value out of a input field with MVC?
I'd like to do something like this:
(javascript/jquery) var searchterm = Searchfield.value
@{
foreach(var term in searchterm) {
<p>post something for each searchterm</p>
}
Is this not possible somehow?
I understand that javascript is client side and MVC server side, so they won't work together, but MVC should be able to to something like this alone or not?
Search for property values
Hey,
I have another problem with MVC and could use some help.
I used SmartBlog ( https://our.umbraco.org/projects/starter-kits/smart-blog/ ) and build myself a simple Blog and now want to add my own partialviews for it and edit some other things.
See my blog here: http://lundp.de/de/blog (at the moment only in german, because itÄs still work in process).
What I want: User should type in a search word, lets say "umbraco". When "umbraco" is typed in I want that all articles are displayed if tag, title, author include the word "umbraco".
My problem at the moment is: How do I get the value out of the search input? And how should my razor code look like to display the articles properly?
Thanks, Chris
Hi Chris,
You might find some useful info and code samples to get started here: http://24days.in/umbraco/2013/getting-started-with-examine/
Lars-Erik
Thanks Lars,
tried that but couldn't get it to work (see comment under the article).
Is there no simple way to get the value out of a input field with MVC?
I'd like to do something like this:
Is this not possible somehow? I understand that javascript is client side and MVC server side, so they won't work together, but MVC should be able to to something like this alone or not?
You have to use AJAX to fire the search from JavaScript.
Here's something that looks like a nice tutorial. :)
http://mytechworld.azurewebsites.net/2013/11/easy-umbraco-search-with-razor-surfacecontrollers-and-ajax/
is working on a reply...