Is there any way of creating a TV that gives a list of galleries from the Gallery addon and returns the ID of the gallery chosen? Failing that, are there any other solutions friendlier than having a user type in a gallery ID to attach a gallery to a particular page?
I have looked creating a custom TV myself, but the docs are sketchy and I don’t know nearly enough Sencha/PHP to do it.
you can try this:
create a chunk ’galleryoption’:
and use a dropdownTv with input-option-values:
@EVAL return 'choose gallery==0'.$modx->runSnippet('GalleryAlbums',array('limit'=>'100','prominentOnly'=>'0','rowTpl'=>'galleryoption'));
Thanks! That works almost perfectly.
For some reason I can’t fathom,outputting the TV on a page returns it with a linebreak, which breaks any snippet calls it’s in. Using [[*gallery-id:strip]] seems to work fine though.
I used this method in Revo 2.1.3.
In some pages it works perfectly, in others the TV resets to empty whenever I open the page for editing. Any idea, why?
Jörg
Hello
Did you try to put your condition UNCACHED ?
[[!+name]] ==[[!+id]] (just put a " ! "before the " + " sign)
Not sure it's the answer, but it could...
Cheers
Hi
Gallery 1.4.0
2 input-types of TV (galleryalbumlist, galleryitem) and 1 output-types (galleryitem) present.
I am used input-types galleryalbumlist and output-types default for my TV
Best Regards