I'm having trouble working with AT templates with Display Suite. I'm using DS 8.x-2.6, with DS Extras enabled.
I have a content type set up to use the Adaptivetheme Two Column: 4-8 layout. No matter what I do I can't seem to override the default AT template. Doesn't matter which of the template/filename suggestions I try, or where I put the template (in the AT directory, or my subtheme directory, under templates root, templates/layout or templates/content). Nothing works. FWIW, if I modify at-layout--twocol.html.twig directly I do see my changes.
Here's the Twig debug info from the source:
<!-- FILE NAME SUGGESTIONS:
x at-layout--twocol.html.twig
* twocol-4-8--node--###.html.twig
* twocol-4-8--node-contenttype-full.html.twig
* twocol-4-8--node-contenttype.html.twig
* twocol-4-8--node-full.html.twig
* twocol-4-8--node.html.twig
* at-layout.html.twig
-->
<!-- BEGIN OUTPUT from 'themes/adaptivetheme/at_core/layout_plugin/templates/twocol/at-layout--twocol.html.twig' -->
Here's what I'm seeing on the Manage Display tab for the content type
Current layout--twocol
Adaptivetheme Two Column: 4-8
The default template can be found in themes/adaptivetheme/at_core/layout_plugin/templates/twocol
Template suggestions:
•twocol-4-8--node.html.twig
•twocol-4-8--contenttype-contenttype.html.twig
•twocol-4-8--node--{id}.html.twig
Note that the second template suggestion is not a type, I am seeing the contenttype doubled like that, which doesn't match any of the file name suggestions from the source. (I did still try that filename and it didn't work!)
Am I missing something, or doing something wrong? Thanks for any help you can provide!
Comments
Comment #2
ABaier CreditAttribution: ABaier commentedI am having the same problem. Jeff, isn't there a way to override at-layout--onecol.html.twig for example, when it was assigned through Display Suite to a specific paragraphs type? Like seen below, the template suggestions surprisingly differ between twig debug and ds layout settings on the display settings.
Thanks in advance!
Comment #3
acb CreditAttribution: acb commentedI see this also -- any fix here?
Comment #4
acb CreditAttribution: acb commentedI figured it out, if anyone is struggling with this issue; you have to override in the base template folder of your theme.
folder structure looks like
themes/custom/adaptivetheme
themes/custom/YOURTHEME
themes/custom/YOURTHEME/color
themes/custom/YOURTHEME/config
...(etc)
themes/custom/YOURTHEME/templates
themes/custom/YOURTHEME/templates/block
themes/custom/YOURTHEME/templates/content
...(etc)
themes/custom/YOURTHEME/templates/ds-1col.html.twig
basically put any hinted templates into the templates folder; not into any nested folder within the templates.