我正在建立职位空缺网站,它有两个角色,用户和雇主。我使用profile2
并为两个角色都有唯一的注册路径。我已经为用户制作了自定义login/register
页面并且进展顺利。
我也想为雇主制作自定义login/register
页。
我已经尝试制作page--employer.tpl.php
但它没有用。
以下是用户page--user.tpl.php
{/ 1}}中的代码:
login/register
答案 0 :(得分:0)
您可以实现(在您的template.php中)template_preprocess_page($variables)
并通过$vars['theme_hook_suggestions']
数组添加您自己的模板文件名建议。
您可以使用current_path()或drupal_get_path_alias()
检查当前路径(在if语句中以了解何时添加建议)查看template_preprocess_page的API。