Quantcast
Channel: Recent posts across whole site
Viewing all articles
Browse latest Browse all 49197

Uncertain about and usage in Drupal

$
0
0

I'm teetering on the brink of using HTML5 in my Drupal themes. But I'm struggling with correct usage of Article tags.

The context in which I'm having a problem is when we're displaying a full node page. The natural place to use an Article tag would be for the element with class="node" in node.tpl.php. The problem is this leaves out the Article's title and tabs, which are both part of the article (in my view), but are dealt with by page.tpl.php rather than node.tpl.php.

I can think of two approaches to tackle this problem:

  1. In page.tpl.php, detect if we're looking at a node, and if we are, wrap the page title, tabs and content in an Article tag. Also, in node.tpl.php, wrap the teaser title, node content and links in an Article tag if we're looking at a teaser, but in plain Div tags if we're looking at a full node display.
  2. Alternatively, remove the page title and tabs from page.tpl.php if we're looking at a node display, and move them into node.tpl.php - inside the Article tag.

The first approach seems doable, but rather messy. The second seems neater, but I'm not even sure it's possible to access tabs from node.tpl.php.

Any suggestions or advice here?


Viewing all articles
Browse latest Browse all 49197

Trending Articles