I use SP 2010 and I have a metadata Termset which is shown in the quick navigation inside a list. I would like to expand it automatically when the site is loading. I tried using JS and a content editor webpart. I used the following JS snippet:
javascript:TreeView_PopulateNode(ctl00_PlaceHolderLeftNavBar_ctl02_ctl01_WebTreeView_Data,1,ctl00_PlaceHolderLeftNavBar_ctl02_ctl01_WebTreeViewn1,ctl00_PlaceHolderLeftNavBar_ctl02_ctl01_WebTreeViewt1,ctl00_PlaceHolderLeftNavBar_ctl02_ctl01_WebTreeViewt1i,' ','Kategorie','Dateien\\Kategorie','t','30:FieldNameNode:2d4b592e-cfb3-4794-a2e6-8b4091e5f707:d62b4acc-3587-4548-88f0-c3fb9b36902c:8ddc6c4e-07f6-4781-86ae-89890d7c2daf:30|ListNode|2d4b592e-cfb3-4794-a2e6-8b4091e5f707|d62b4acc-3587-4548-88f0-c3fb9b36902c|dee2f67f-95c6-411c-8683-16a09963ffcd','tt')
However, since the IDs change everytime I rebuild the page with my Powershell script (which I use to build the page), the code won't work the next time I use the script. Is there another way to do it programmtically?
0 commentaires:
Enregistrer un commentaire