This forum is for assistance with theme development.

a page.tpl.php file for all the terms of a taxonomy vocabulary

The header of a page is inside the page.tpl.php. Right? So, in my news website project I have the header there.

Let's say I have to change the template for all the "sports" news. I created a specific machine type (sport_articles) and a specific vocabulary of terms.

Now.... I created a page--sport_articles.tpl.php to show the right header when I see the content of the nodes of the sport_articles type. I also created a page--sports.tpl.php, that actually themes the view that loads all the sport_articles nodes.

Theme Registry Question

Hi ,

When I run the cron I get this error:

array_key_exists(): The first argument should be either a string or an integer theme.inc:421

From this fucntion - https://api.drupal.org/api/drupal/includes!theme.inc/function/ThemeRegis...

I think the cause of the error (offset value is incorrect or missing) seems clear, but I'm not sure where to debug this .

Full Bootstrap Drupal 7 usage Tutorial

I'm sure it has to be me, but I have been searching for the past several days for a complete, beginning to end bootstrap drupal 7 theme usage tutorial.

Custom edit page

Hi to all,
I want that user with specific roles can edit some info.
Example:
User_name: student_1
User_grade:10

That fields are inside a body into a node.
I'd want that an user with role "teacher" can edit User_grade value (only this field not all body node).
How can I do it?
I tried with a lot of modules(access_block, field_view_permission ecc.) but without results.
Can someone help me please?

API to get content from a pathname

I am building a specialized slide-like display and am trying to find an API that, given a pathname like node/4 or content/whatever, returns the node suitable for inclusion on the page via drupal_render or something similar. The closest I have found is

e.g. for node/24
$n = entity_load('node', [24]);
$v = node_view($n[24]);
print drupal_render($v);

Ultimately, I want to take html fragments and place them in a specific

on the page so other approaches would be okay as well.

Any advice greatly appreciated.

a jpeg in a custom node.tpl.php

Hi,

I have a field called 'field_athletephoto' which is an image and I'm using a customized node.tpl.php. (node-athlete.tpl.php)
Now I want to show the picture (jpeg) into the customized node but it's not working.

This is what I use, maybe the two lines have nothing to do with each other, I don't know.
please help me. thanks a lot.

Pages

Subscribe with RSS Subscribe to RSS - Theme development