开发者

Drupal - General means for finding templates?

开发者 https://www.devze.com 2022-12-14 04:25 出处:网络
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:

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:

  1. The current template file(s) being used
  2. The filename(s) I can create 开发者_StackOverflowin the local folder to customize them
  3. 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.

Drupal - General means for finding templates?

You can use PHP's get_defined_vars() function to get the variables available in a particular template or function.

0

精彩评论

暂无评论...
验证码 换一张
取 消