-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
4.3: Template not loaded despite overridden template path #45
Comments
Thanks for the feedback and a big sorry for the (very!) delayed response. You are right, the current templating mechanism might be a little confusing when starting with this extension. The non standard behavior is a left over of the pre Extbase / Fluid era of this extension and the fact it's needed to somehow configure the template file per gallery type. Extbase / Fluid only allows to configure one template path which is added to the controller and action name in order to determine the full file path to the template. For this extension we have another aspect: it allows to have different gallery types with (obviously) different templates. So controller and action for determining the last folder and file name is not sufficient. I think configuring the whole file path ( I do see that the docs need an update to better reflect on this behavior. Probably the default gallery type should have no I've added a PR with some proposed changes and would love to hear your feedback! Please see here: #56 |
Configuring the whole file path is better indeed. |
Thanks for the feedback! PR has been merged :-) |
I tried to use the gallery extension as base for my own gallery, only wanting to adjust the template file by overriding it in my provider extension.
So I installed generic_gallery 4.3.0, included the default typoscript template and set the constant to override the template directory:
Then I created
myext/Resources/Private/Templates/GalleryCollection/Show.html
and .. it did not get loaded.(IMO this is the standard way of overriding templates in nearly all typo3 extensions).
To debug the issue, I removed generic_gallery's
Show.html
and now got an exception:I confirmed multiple times that
/var/www/typo3/public/typo3conf/ext/myext/Resources/Private/Templates/GalleryCollection/Show.html
actually exists, which it did.In the end I found that
generic_gallery/Configuration/TypoScript/setup.typoscript
includesEXT:generic_gallery/Configuration/TypoScript/Examples/setup.typoscript
, which sets.. which overrides the template path configured earlier.
This is very confusing.
I suggest not loading the example typoscript with the standard generic_gallery typoscript (instead adding an example typoscript record that can be selected in the typoscript template setup), and adding a section about templating in the manual.
The text was updated successfully, but these errors were encountered: