Sitecore return only items with versions in the current language -


legend: i'm working on sitecore project have multi-language site single content tree items have versions in each supported language. want develop clean way of querying items exclude items don't have version in current context language.

ideas: thinking of making templates inherit template shared checkbox list field represent languages supported given page.

note: clear, different language fallback. want hide items have not been translated context language.

question: there clean way using sitecore pipelines mean xslts , api code queries content tree doesn't have reference shared template field every time?

there's not way query in sitecore query. can detect , filter out of results of query so:

ienumerable<item> items = // code myitems.where(x => x.versions.count > 0); 

if you're looking filter before have items returned, checkbox idea 1 possible solution of course prone becoming desynced actual languages. @ using lucene , advanced database crawler module pack dynamicfield index containing list of languages have versions queried. of course lucene not appropriate general purpose queries.


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -