Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Modify WHM "Create a New Account" template

Discussion in 'cPanel Developers' started by pijulius, Jan 4, 2012.

  1. pijulius

    pijulius Member

    Joined:
    Jan 31, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    Hi Guys, I'm new to the development under WHM/cPanel, I read some of the documentation that you have and I see there is a lot of possibility to integrate a code to the WHM using API or even write own plugins but I have a different need and maybe you can point me to the right direction.

    What I would like to do is to add a new section to the WHM "Create a New Account" page and I know you can easily clone the default theme and then just edit the docroot/templates/createacct.tmpl and add the code needed but for my small change I think there is a better way.

    I saw in the createacct.tmpl file that there is a line that would do just exactly what I want but can't find any help on google, I'm talking about:

    Code:
    [% FOREACH custom_field = data.custom_fields;
    INCLUDE "${custom_field.path}" IF custom_field.type == 'tt2';
    END; %]
    and as I see if I could somehow add a new custom_field to the data.custom_fields with a type=tt2 and path='mysection.tmpl' this would work just perfectly

    So my question would be how could I add custom fields to the data variable lets say from API or XML so I don't have to modify the createacct.tmpl file?

    Thanks in advance!
     
    #1 pijulius, Jan 4, 2012
    Last edited: Jan 4, 2012
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice