当前位置: 动力学知识库 > 问答 > 编程问答 >

Embed registration page on another page in Drupal?

问题描述:

Currently you can get to the registration page by going here: user/register

I need to be able to embed the registration form on ANOTHER page. How do I do that?

网友答案:

You could try the method suggested here: http://drupal.org/node/248275

a.k.a. embed the form using the PHP Code input filter:

<?php
  print drupal_get_form('user_register'); 
?>

However, there will be a few gotchas with trying to embed the user registration page anywhere besides /user/register, because of the way Drupal's User module is set up.

It might be better for you to form_alter the user registration form, so you can customize it to fit your needs. Or, you might be able to get by with adding a block specifically to the user registration page.

What exactly are you trying to achieve by adding the registration page somewhere else?

分享给朋友:
您可能感兴趣的文章:
随机阅读: