i'm new drupal , reading through docs, hoping explanation something.
i have page called page--type-home-page.tpl.php. part of page prints render($page['content'])). want remove rendered part of page content page, don't understand comes , where/how look.
thanks!
assuming you're talking drupal-7
well $page['content']
contains string, rendered version of what's injected content region of theme.
by default, block in region "main page content" block generated drupal core. many things can generate content pass through menu api. instance, if you're viewing node, url used is: node/12
. node module declares menu entry node/%node
, menu entry contains callback function render whatever module wants render. module, then, may use different strategy render it's content simple function complex imbrication of templates.
the key alter what's in box, sorry, what's in $page['content']
, know rendered , understand how it's rendered.
if it's node, first want if can achieve goal through display settings of content type. admin/structure/types/manage/page/display
: , true entities (users, comments, taxonomy term etc.) because first thing module of these entities put when they'll try render content.
if not enough achieve goal, can module renders path see if hasn't .tpl.php
. you'll able re-use in theme. you'll want copy/paste file in theme , edit it.
if module not have tpl
file override, try template suggestion: here's list drupal.org
ex: node--type.tpl.php
if doesn't satisfy need, you'll have dig preprocess functions; functions allow modify what's in variables passed .tpl.php
files. that's little more advanced , recommend read this previous stackoverflow question/answer
Comments
Post a Comment