My idea is to simply create a custom content element and then to provide a list of image asset objects with a specific tag via TypoScript to the html template. With this no additional PHP code would be needed.
Hey @olibur,
currently it is not possible to access the media repository and select media by tags using TypoScript and without using PHP. Thats one of the reasons, I used the ViewHelper approach. Another suitable way would be to build an eelHelper that is capable of selecting media by tags.
Once we have an advanced meta data management for assets available, there will be a comfortable way to select assets via TypoScript.
ah oke, thanks for the background info. Are the assets stored as nodes too or aren’t they? So theoretically we could query somehow “Give me all nodes below /media/collectionXY with given property tag”? Or are the assets somehow handled differently than normal content nodes?
I’ve changed the columnClass and the thumbnail sizes.
But somehow this config is not loaded, it still uses the default ones. Do I need to move the config to the root Configuration folder?
Then as far as I have seen the thumbails get generated in the Web/_Resources/Persistent/… folder. How can I easily remove unused image thumbs if I delete a Gallery from a page? Or is this done automatically? Or do I need to do this manually in the filesystem?
Check the indentation of the YAML (looks wrong in your post) and make sure your package is loaded after the gallery package (by adding a dependency from your package to the other).
I have corrected the YAML indentation in my post above, but in my code it was already ok.
Where do I need to add this dependency? In the composer.json of my site package?
What I still have found out:
If I create a Settings.yaml file in the “Development” folder, it works. So the config in the file /Packages/Sites/MY_SITE/Configuration/Settings.yaml does not work, but in /Packages/Sites/MY_SITE/Configuration/Development/Settings.yaml it works. How is this possible?
I have also flushed the cache to be sure after changing the Settings.yaml.
I have flushed then all the caches, but it does not yet work. It still loads the default Gallery settings. But as already stated in my last comment: If I add the configs to the Settings.yaml stored below Configuration/Development then it works. But it should actually also work if its just stored in Configuration/Settings.yaml right?
If you add a Settings.yaml in Configuration/Development, this takes precedence of all Settings.yaml in just Configuration of all Packages and the base distribution.
The settings on the same level - eg all settings directly in Configuration are overwritten in the order of the package dependency. Therefore you need to add the dependency to the gallery package in your site packages composer.json.
Here
“require”: {
“dl/gallery”: “*”
}
would be enough. If this isn’t working. Try to remove the file Configuration/PackageStates.php which is then generated according to the new dependency.