Skip to content. | Skip to navigation

Personal tools
Log in
Sections
You are here: Home Web Plone Snippets and Examples Adding to personalize_form

Adding to personalize_form

Using the new macros to avoid overriding the whole form

Some recent version of Plone added hooks for adding fields (or anything else) to the personalize_form without needing to override the whole thing.

How do to it

  1. Add additional_memberdata.pt to a skin layer of your theme or other product
  2. Define one or more of the macros that will be checked:
    1. top
    2. bottom
    3. after_primary

Example

I wanted to add a password reset link to the form, so I created the following addtional_memberdata.pt:

<p metal:define-macro="top">
<a href="" tal:attributes="href string:${portal_url}/password_form">Change my password</a>
</p>

I defined the macro top, so my link appears at the very top of the form:

 

The after_primary macro inserts your snippet after the Full Name and E-mail fields:

<p metal:define-macro="after_primary">
<a href="" tal:attributes="href string:${portal_url}/password_form">Change my password</a>
</p>

Document Actions

Comments (0)

« May 2012 »
May
MoTuWeThFrSaSu
123456
78910111213
14151617181920
21222324252627
28293031