Is there a value I can test for to tell whether a nodeblock is being displayed as a node (either as a page, or as a teaser) or in a block?

Reason: I have a content type that I use to create nodeblocks, mostly so I can embed menus. (Can't use the same menu in two different regions, and Rep[lacement] Tags doesn't work with blocks.) I want to create a simplified template for this content type that lets people see the Title if it's displayed as a page, but hides it if it's displayed in a block. (Otherwise, I always have to hide the title using CSS -- and the title is still there cluttering up my HTML.)

Comments

tom_o_t’s picture

I don't know the answer to your question, but if all you need to do is display extra versions of a menu, I'd recommend http://drupal.org/project/menu_block - sounds like that might be a better way to get the result you're after.

tom_o_t’s picture

Component: Code » Documentation
Status: Active » Fixed

If a node is being displayed as a nodeblock, it will have that available in the $node object.

From nodeblock.module line 143:

    // Set a flag so that themes have more context.
    $node->nodeblock = TRUE;

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.