留言板

Customized Sign up forms that links to other portlets

Nyan Tun Zaw,修改在8 年前。

Customized Sign up forms that links to other portlets

New Member 帖子: 9 加入日期: 15-7-24 最近的帖子
Hello,

For the website i'm building currently using Liferay 6.2 , i would like to design a sign up form with customized field (it's a sign up form for businesses to register actually - will contain things like business name, description, logo, etc). May I know how can i go about doing that?

And also, i would like to display (on another page) these businesses's data dynamically. Something like a list with business logo, name, description sorted alphabetically. But i'm stuck on how to link. Any useful thing i can do or any workaround for that?
thumbnail
Andew Jardine,修改在8 年前。

RE: Customized Sign up forms that links to other portlets

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Hi Nyan,

There are several ways to do this in Liferay but the most straight forward is probably to build a custom portlet that uses service builder. You can find details on service builder (if you are not already familiar with it) here: https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/what-is-service-builder-liferay-portal-6-2-dev-guide-04-en.

I am envisioning an MVC Portlet that has two views at least. The default view to render the list of of accounts that have already been added -- as you mentioned here


And also, i would like to display (on another page) these businesses's data dynamically. Something like a list with business logo, name, description sorted alphabetically


and then a seperate view that would be used to render the form that the users complete to add a new account to the system. Once you have done this you could even take to it to the next level in terms of reuseability and apply Application Display Templates (ADTs) to it: https://www.liferay.com/documentation/liferay-portal/6.2/development/-/ai/application-display-templates-liferay-portal-6-2-dev-guide-14-en

.. start with that and let us know how it goes, or if you get into trouble and we can try to help out further.
Nyan Tun Zaw,修改在8 年前。

RE: Customized Sign up forms that links to other portlets

New Member 帖子: 9 加入日期: 15-7-24 最近的帖子
Thanks for the advice!

To clarify, for my case, i will be having more than one such cases. (i.e. will have 3 different sign up forms for three different types of organizations and each type of organization has its own page to display the list of organizations that registered under that category.

As for the workflow, after signing up, one of the admins need to approve the content first and then it will show up in the list view page.

So, for this kind of case also i can still do the same thing? Will be great to have more specific guides because i am totally new to liferay (just started exploring less than 3 weeks ago)

Appreciate the help! =)
thumbnail
Andew Jardine,修改在8 年前。

RE: Customized Sign up forms that links to other portlets

Liferay Legend 帖子: 2416 加入日期: 10-12-22 最近的帖子
Hi Nyan,

I think the approach still applies. If you have three orgs..

1. Org A
2. Org B
3. Org C

... and each one has a pair of displays, assuming that the displays are different enough to warrant their own views, then you can have something like --

1. orga_form.jsp, orga_account_list,jsp
2. orgb_form.jsp, orgb_account_list,jsp
3. orgc_form.jsp, orgc_account_list,jsp

You can control which one of those things is rendered (incase you haven't worked this part out yet) using a renderURL with a portlet parameter with the name mvcPath. So for example -- if I want to render the orga_account_list ... then I might have (on another page)


<porlet:renderurl var="orgaAccountListRenderURL">
   <portlet:param name="mvcPath" path="/html/orga_account_list.jsp" />   // make sure the path is relative to you docroot


<div>
   <a href="${orgaAccountListRenderURL}">See Organization A Accounts</a>
</div>
</porlet:renderurl>


because you specified the mvcPath variable, Liferay with use THAT jsp when it renders. The absence of the mvcPath (or jspPage) parameter will cause the default view (configured as the VIEW init-param in your portlet.xml -- which is typically view.jsp) to be used.