Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from umbraco import library
- from umbraco.presentation.nodeFactory import Node
- import sys
- import clr
- try:
- #Use this to set the path to the assembly
- #from System.Reflection.Assembly import GetExecutingAssembly
- #print GetExecutingAssembly().CodeBase
- clr.AddReferenceToFileAndPath('C:/Users/f-s/desktop/webtryouts/Umbraco/enome/src/Enome.Web_new/bin/cms.dll')
- from umbraco.cms.businesslogic.media import Media
- mediaId = int(currentPage.GetProperty('afbeeldingen').Value)
- for child in Media(mediaId).Children:
- url = child.getProperty("umbracoFile").Value.ToString()
- print '<img src="{0}" />'.format(url)
- except:
- exctype, value = sys.exc_info()[:2]
- print exctype, value
Advertisement
Add Comment
Please, Sign In to add comment