Closed (fixed)
Project:
Nodeblock
Version:
6.x-1.2
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
30 Oct 2009 at 19:01 UTC
Updated:
19 Jan 2010 at 00:10 UTC
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
Comment #1
tom_o_t commentedI 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.
Comment #2
tom_o_t commentedIf a node is being displayed as a nodeblock, it will have that available in the $node object.
From nodeblock.module line 143: