[themes] Overriding zone etc. templates for specific content types in D7

Jeff Greenberg listmail.ayendesigns at gmail.com
Sun Mar 3 16:31:01 UTC 2013


Arrgh. So I found several references to, and created a template called
node--product-display.tpl.php. It's in my themes's template directory with
the other templates in use, and I did clear cache.

When I load the page and click on the product area, with theme developer
running, it gives me this for the theme candidates:
node--product--type.tpl.php < node--23.tpl.php <
node--product-display.tpl.php < node.tpl.php

Yet, anything I put in the template file is ignored, including exit;


On Sun, Mar 3, 2013 at 9:47 AM, Jeff Greenberg <jeff at ayendesigns.com> wrote:

> Yes, Omega. A zone is like a superset of a region. So what I want to do is
> have a template that controls a zone for only a specific content type. I
> suspect I'll need to peruse the Omega template.php file
>
> --
> In the top 10% viewed LinkedIn profiles for 2012
> --
> 404-271-9734
> Sent from my iPhone. Any typos are the result of my oversized fingers or
> Siri not being able to comprehend my dialect.
>
> On Mar 3, 2013, at 12:32 AM, Info Razor <inforazor at gmail.com> wrote:
>
> Hi Jeff,
>
> Not sure what you mean by "zone template" (referring to Omega theme
> maybe?) but if all you want to do is to make a template for a Node, the
> format is:
>
> node-{NAME}.tpl.php
>
> where {NAME} is the *machine* name for your content type.
>
> You can also find out the template suggested names by using the module
> devel_themer, and then clicking on the content type you are interested in.
> It will suggest functions in template.php and/or template names you can
> use, based on what you select.
>
> make sure to turn off devel_themer after you need it though cause it does
> mess up other regular stuff (its a bit of a hog-bug)
>
> there are other techniques to engineer the template names, but this should
> get you started.
>
> Good luck!
>
> rgds,
>
> datarazor
>
> --
> Info Razor
> Sent with Sparrow <http://www.sparrowmailapp.com/?sig>
>
> On Saturday, March 2, 2013 at 9:20 PM, Jeff Greenberg wrote:
>
> Is there a template hint for overriding a zone template for a specific
> content type, such as a content zone template for product display, or do I
> need to create one in template.php?
>
> --
> ---
> drupal.org/user/367108
> linkedin.com/in/jeffrgreenberg
> accidentalcoder.com / ayendesigns.com
> @accidentalcoder
>  _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
>
>  _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
>
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes
>
>


-- 
---
drupal.org/user/367108
linkedin.com/in/jeffrgreenberg
accidentalcoder.com / ayendesigns.com
@accidentalcoder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/themes/attachments/20130303/7f418f6b/attachment.html 


More information about the themes mailing list