Pages

Wednesday, 29 January 2014

Small Code snippet

Creating a create account URL in Velocity template

  Step 1:Add the below lines in init_custom.vm file
  • #set ($create_account_url = $portletURLFactory.create($request, "58", $page.getPlid(), "ACTION_PHASE"))
  • $create_account_url.setWindowState("maximized")
  • $create_account_url.setPortletMode("view")
  • $create_account_url.setParameter("saveLastPath", "0")
  • $create_account_url.setParameter("struts_action", "/login/create_account")
Step 2:Add the below lines in your  Velocity template
  •    <a href="$create_account_url" class="bt-signup">SignUp</a>
That's it  deploy you'r theme and see the output.