[development] Custom template for taxonomy term page in Drupal 7

Carl Wiedemann carl.wiedemann at gmail.com
Mon Apr 18 16:55:22 UTC 2011


You could use arg()
http://api.drupal.org/api/drupal/includes--path.inc/function/arg/6

if (arg(0) == 'taxonomy' && arg(1) == 'term' && is_numeric(arg(2))) { ... }


On Mon, Apr 18, 2011 at 10:47 AM, Deva <devendra.in at gmail.com> wrote:

> One more question.
> How to identify in "preprocess_page" function, if the current loading page
> is "Taxonomy Term" page.
>
> On Mon, Apr 18, 2011 at 10:12 PM, Deva <devendra.in at gmail.com> wrote:
>
>> This will help. Thanks a ton.
>>
>> On Mon, Apr 18, 2011 at 10:08 PM, Carl Wiedemann <
>> carl.wiedemann at gmail.com> wrote:
>>
>>> Yes, you can define your own template suggestions via template preprocess
>>> functions. See http://drupal.org/node/223440
>>>
>>>
>>>
>>> On Mon, Apr 18, 2011 at 10:29 AM, Deva <devendra.in at gmail.com> wrote:
>>>
>>>> Thanks Carl.
>>>>
>>>> Is there any other solution like updating template.php file to force
>>>> Drupal to use our custom template like "page-taxonomy.tpl.php" as this is
>>>> possible in D6.
>>>>
>>>> On Mon, Apr 18, 2011 at 9:41 PM, Carl Wiedemann <
>>>> carl.wiedemann at gmail.com> wrote:
>>>>
>>>>> Using the Views module http://drupal.org/project/views, you can
>>>>> override the basic taxonomy/term/[tid] then under the "Theme: Information"
>>>>> link in the Views UI, leverage the views template suggestions as part of
>>>>> your theme to customize the markup.
>>>>>
>>>>> On Mon, Apr 18, 2011 at 8:07 AM, Deva <devendra.in at gmail.com> wrote:
>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>> I want to customize taxonomy term page for particular vocabulary. (for
>>>>>> all vocabulary is also fine)
>>>>>> I am able to customize look and feel of node teasers by using
>>>>>> http://drupal.org/node/1106090
>>>>>> It provides a way to style the node differently while listing vs
>>>>>> displaying full node.
>>>>>>
>>>>>> Now i want to have separate template for taxonomy term page. I don't
>>>>>> see any default "Drupal 7 Template Suggestions" at
>>>>>> http://drupal.org/node/1089656
>>>>>>
>>>>>> Anyone know how to achieve this?
>>>>>>
>>>>>> Thanks in advance.
>>>>>>
>>>>>> --
>>>>>> :DJ
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> :DJ
>>>>
>>>>
>>>>
>>>
>>
>>
>> --
>> :DJ
>>
>>
>>
>
>
> --
> :DJ
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20110418/b562f54a/attachment.html 


More information about the development mailing list