Yeah it's closed...but you're wrapping the expression in "" - Those gotta go :)
This is what your variable looks like var Searcher = Examine.ExamineManager.Instance.SearchProviderCollection["@Umbraco.Field("#DictionaryItemHERE")"];
It should look like this var Searcher = Examine.ExamineManager.Instance.SearchProviderCollection[@Umbraco.Field("#DictionaryItemHERE")]; - Otherwise the expression is interpreted as a string...and you can't have "" inside "".
Topic author was deleted
Why can't I get a dictionary item into here?
Hi Guys,
I am trying to get a dictionarty item into my variable, however I can't seem to get it working.
Could some please suggest how to get this working? or even using an Umbraco Document Type Field would suffice.
Many thanks, kind regards - Stephen
Hi Stephen
I have not tried this myself but perhaps either using
var Searcher = Examine.ExamineManager.Instance.SearchProviderCollection[@Umbraco.Field("#DictionaryItemHERE")]
; orDoes any of these approaches work?
/Jan
Comment author was deleted
Jan, thanks for the reply.
But both throw this exception.
Hi Stephen
Hmm, did you miss the closing ] when copying over the example? What does your exact code look like?
/Jan
Comment author was deleted
Meh - Don't worry - I figured out my problem.
I kept in the original quotation marks inside the [].
Many thanks for the help Jan.
Hi Stephen
Yeah it's closed...but you're wrapping the expression in "" - Those gotta go :)
This is what your variable looks like var Searcher =
Examine.ExamineManager.Instance.SearchProviderCollection["@Umbraco.Field("#DictionaryItemHERE")"];
It should look like this var Searcher =
Examine.ExamineManager.Instance.SearchProviderCollection[@Umbraco.Field("#DictionaryItemHERE")];
- Otherwise the expression is interpreted as a string...and you can't have "" inside "".Hope this makes sense.
/Jan
Comment author was deleted
Indeed. Many thanks.
is working on a reply...