I'm writing a small includable snippet for Photo Album that outputs a random photo and a link to the corresponding photo album page.
I want to make it subsite-aware so that user can define url="/photos1" in the include tag and then get the photo from only photos under that photo album instance. The problem is that I can't find an easy way to tie individual cr items (i.e. photos) to a package. The only place in content repository having a package_id field is cr_folders and even there, the field is empty for all photo album instances (folders and albums).
Even if the package_id field were there, we'd only be interested in the package id of the Photo Album root id, so we'd probably need to make a recursive query or a view to get the id we want.
I of course hope there's some easier way that I haven't found. Hopefully someone could help me on this.
Request notifications