sitecore6 - How to create a dynamic source for a multilist in Sitecore? -


i have following content tree structure:

  • home
    • products
      • product a
      • product b
    • organizations
      • org 1
      • org 2
        • org config x
        • org config y

each organization beneath organizations has field called "associated products" multilist. tells system products go each organization. org config data template has field called "selected products". when add new org config content item (which lives directly beneath organization) able restrict items displayed in "selected products" field (which multilist) display products associated parent organization. thinking there might way sitecore query can't figure out. ideas?

with of sitecore figured out. have create custom control inherits multilistex. need override dorender() event. before call base.dorender() must change source (this.source) use sitecore query. trying in onload event. code looks this:

public class custommultilist : multilistex {   private void excludeitems()   {     ...custom code here builds list of item ids exclude multilist source...     ...list should "@@id != 'some guid' , @@id != 'some guid' , forth...     ...you build list of item ids include. sitecore query do...     ...you can use this.itemid reference current item being edited in content editor...      this.source = "query:" + this.source + "/*[" + mylistofitemidstoexclude + "]";   }    protected override void dorender(output)   {     this.excludeitems();     base.dorender(output);   } } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -