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

kclarkson’s picture

Component: Documentation » Code
kclarkson’s picture

Project: Display Suite » Omega
Version: 7.x-2.x-dev » 7.x-3.1

I 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.

scottsawyer’s picture

I 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.

kclarkson’s picture

Title: Views Display Templates not Recognized (7.x-2.x) - Using Omega » Display Suite: 2 Column Templates not Recognized (7.x-2.x) - Using Omega

Sorry 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.