Drupal - General means for finding templates?
Given that I have a URL to a page and I can see the content on it as a user, is there a simple way to find out what template files are producing the page? Ideally I would like to know three things:
- The current template file(s) being used
- The filename(s) I can create 开发者_StackOverflowin the local folder to customize them
- What variables are available to these file(s)
I just want to know what the general procedure is for finding this information out.
The devel_themer module includes a theme developer function that'll let you click anywhere in the page and determine what templates, theme functions, etc. are used (or can be used) to generate an element.
You can use PHP's get_defined_vars()
function to get the variables available in a particular template or function.
精彩评论