Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When trying to create a template for views displays my custom tpl.php is not recognized.
I am using the Omega theme. When adding other custom layout templates everything seems to work fine. I am only experiencing this when trying to add a view layout such as: ds-2col--ds-views-staff-block-1-fields.tpl.php
Comments
Comment #1
kclarkson CreditAttribution: kclarkson commentedComment #2
kclarkson CreditAttribution: kclarkson commentedI am using display suite to theme my teasers. When trying to customize a template file with Display Suite, for some reason the template files are not recognized.
I enabled the bartik theme and it they were recognized right away.
Comment #3
scottsawyerI have an Omega site that is using several views templates, so I am sure that the problem isn't directly related to Omega.
Just so I can be sure we are talking about the same thing, and your set up is like mine, here is what I am doing:
Create a view, this case a block.
Go to Theme: information
Make sure you choose the template name suggestion you want to create the template for ( mine are rows templates)
I click on the default template name I want and copy the code displayed.
Now in my theme/templates I create a new file and name it the same as the suggestion I want to over ride.
Edit the new file, paste the code from the default suggestion, code away.
Save the file, upload ( if you are using FTP to a promote install ).
Now in my view - theme - information dialog, I click scan. If everything worked, your new template name ( which was one of the suggestions) is highlighted. Save .
You may need to flush your cache, I haven't needed to.
Sorry if my instructions were a bit vague, I'm walking the dog.
If you followed these steps and it still isn't working, make sure your code doesn't contain errors ( maybe try with the default code to see if the name is recognized).
If still no luck, maybe post your exact scenario.
Comment #4
kclarkson CreditAttribution: kclarkson commentedSorry for not clarifying my issue. I am using Display Suite and am trying to use the two column display where I create a template file based on the suggested names. For some reason theses templates are not recognized.