duanhuanzhi6431
2015-05-01 10:21
浏览 65
已采纳

Drupal - 带参数的自定义页面

I am looking to hook every URL that starts with /questions to one template file.

So for example:

  1. /questions
  2. /questions/question1
  3. /questions/question1/respond
  4. /questions/question1/somethingelse

all of the above should go to my template questions.tpl.php Then within my questions.tpl.php I want to do stuff with the arguments.

Is there a way to do this? I have been searching for a week now.

图片转代码服务由CSDN问答提供 功能建议

我希望将每个以/ questions开头的URL挂钩到一个模板文件中。</ p> \ n

例如:</ p>

  1. / questions </ li>
  2. / questions / question1 </ li>
  3. / questions / question1 / respond </ li>
  4. / questions / question1 / somethingelse </ li> </ ol>

    以上所有内容都应该转到我的模板questions.tpl.php 然后在我的questions.tpl.php中我想用参数做些什么。</ p>

    有没有办法做到这一点? 我一直在寻找一个星期。</ p> </ div>

1条回答 默认 最新

相关推荐 更多相似问题