Foren

Terms and conditions page in liferay

Abhi Ed, geändert vor 11 Jahren.

Terms and conditions page in liferay

Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
When a newly created user signs in for the first time, the terms and conditions page is displayed.
However,I want to show different jsp page instead of liferay's terms and conditions page in my theme,for the new user.
Can this be done?
thumbnail
David H Nebinger, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
No. Terms and conditions is actually a web content, I believe, and portal-ext.properties can be used to determine which one to display, but you cannot display your own JSP out of the box.
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Abhi,

Yes, you can use your custom terms of use content instead of Liferay OOTB. Liferay provides way to do this using Web Content. So you just need to provide your web content which contains all the terms. Fro that you need to mention below properties in portal-ext.properties file.

#
# Specify the group id and the article id of the Journal article that will
# be displayed as the terms of use. The default text will be used if no
# Journal article is specified.
#
terms.of.use.journal.article.group.id=
terms.of.use.journal.article.id=


In which terms.of.use.journal.article.group.id, you need to provide group id of your site. And terms.of.use.journal.article.id will be the value of your article id, which you can get by going into Control Panel --> Web Content portlet and go to your desired web content and just get articleId from second colum(named Id). Provide it in last property.

Now restart your server and next time when any new user logs in, it will display your new terms and condition.

For more details, you can check html\portal\terms_of_use.jsp.

HTH.

Thanks,
Tejas
thumbnail
Sachin Mane, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Junior Member Beiträge: 76 Beitrittsdatum: 10.04.12 Neueste Beiträge
Thanks for the pointer tejas.
We had a requirement to display portal instance specific terms of use content. We ended up creating a hook which used JournalArticleService to get the content and display it.
Abhi Ed, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
Tejas Kanani:
Hi Abhi,

Yes, you can use your custom terms of use content instead of Liferay OOTB. Liferay provides way to do this using Web Content. So you just need to provide your web content which contains all the terms. Fro that you need to mention below properties in portal-ext.properties file.

#
# Specify the group id and the article id of the Journal article that will
# be displayed as the terms of use. The default text will be used if no
# Journal article is specified.
#
terms.of.use.journal.article.group.id=
terms.of.use.journal.article.id=


In which terms.of.use.journal.article.group.id, you need to provide group id of your site. And terms.of.use.journal.article.id will be the value of your article id, which you can get by going into Control Panel --> Web Content portlet and go to your desired web content and just get articleId from second colum(named Id). Provide it in last property.

Now restart your server and next time when any new user logs in, it will display your new terms and condition.

For more details, you can check html\portal\terms_of_use.jsp.

HTH.

Thanks,
Tejas


Thanks a lot,Tejas for the enlightening explanation. But my Terms and Use web content is coming blank.
I added following entries in portal-ext.properties:
terms.of.use.journal.article.group.id=14901 ------------------ this one is ID of web content
terms.of.use.journal.article.id=OverLayPage --------------------- this one is name of web content

Am i doing sth wrong?
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
terms.of.use.journal.article.group.id=14901 ------------------ this one is ID of web content
terms.of.use.journal.article.id=OverLayPage --------------------- this one is name of web content


for first property, terms.of.use.journal.article.group.id
you need to provide groupId of your site and not the web content id.
And for second property terms.of.use.journal.article.id, you need to provide web content id.

So try with this,
terms.of.use.journal.article.group.id={site ID}
terms.of.use.journal.article.id=14901

You can get Site ID from Control Panel --> Sites --> Your Site --> Edit --> Site ID (Check attached image)
You can get Web Content ID from Control Panel --> Web Content portlet and go to your desired web content and just get articleId from second colum(named Id)
Abhi Ed, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
Tejas Kanani:
terms.of.use.journal.article.group.id=14901 ------------------ this one is ID of web content
terms.of.use.journal.article.id=OverLayPage --------------------- this one is name of web content


for first property, terms.of.use.journal.article.group.id
you need to provide groupId of your site and not the web content id.
And for second property terms.of.use.journal.article.id, you need to provide web content id.

So try with this,
terms.of.use.journal.article.group.id={site ID}
terms.of.use.journal.article.id=14901

You can get Site ID from Control Panel --> Sites --> Your Site --> Edit --> Site ID (Check attached image)
You can get Web Content ID from Control Panel --> Web Content portlet and go to your desired web content and just get articleId from second colum(named Id)


Thanks again!!
I am using Liferay 6. I can't find Sites following Control Panel link.Only one name starts with sites and that is Sites Template and that is obviously not the one.
Any help??
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
If you can access your database table, just look in journalarticle table and find the row with the webcontent if you've created and just check the value in the groupid column.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Only one name starts with sites and that is Sites Template


Below "Users, User Groups and Organizations" there should be "Sites and Teams"
Abhi Ed, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
Hitoshi Ozawa:
Only one name starts with sites and that is Sites Template


Below "Users, User Groups and Organizations" there should be "Sites and Teams"




Thanks Hitoshi.Please notice in attached pic, Below "Users, User Groups and Organizations" there is no "Sites and Teams
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
If you are using Liferay 6.0. Then it should be Communities instead of Sites.
thumbnail
Hitoshi Ozawa, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Legend Beiträge: 7942 Beitrittsdatum: 24.03.10 Neueste Beiträge
Sorry, but can't see your screenshot image. I only see an icon.

That aside, as Tejas mentioned, you're probably not using Liferay 6.1.0 GA1. "Communities" was renamed to "Sites" in Liferay 6.1.0 GA1. When posting a question, it's recommended to specify which version of liferay you're using.
Abhi Ed, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 118 Beitrittsdatum: 04.06.12 Neueste Beiträge
Hitoshi Ozawa:
Sorry, but can't see your screenshot image. I only see an icon.

That aside, as Tejas mentioned, you're probably not using Liferay 6.1.0 GA1. "Communities" was renamed to "Sites" in Liferay 6.1.0 GA1. When posting a question, it's recommended to specify which version of liferay you're using.



Sorry for the discomfort. I am using liferay -6.0.6-. I don't know,why my image isn't getting uploaded.
However,in mine version i guess community isn't for sites.
thumbnail
Krati Gupta, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 119 Beitrittsdatum: 05.12.08 Neueste Beiträge
Hi All,

I am using Liferay 5.2.3 , so please tell me how will I get the group.id
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Hi Krati,
I am using Liferay 5.2.3 , so please tell me how will I get the group.id

I guess It should be same in 5.2.3. You can get it using themeDisplay.getScopeGroupId() in your jsp. If scopeGroupId is not available try for getGroupId()
thumbnail
Krati Gupta, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 119 Beitrittsdatum: 05.12.08 Neueste Beiträge
Hi Tejas,

I want to use :

terms.of.use.journal.article.group.id=12345 ------------------ (organization group id where below article belong)
terms.of.use.journal.article.id=78945

properties for configuring Terms_of_use , but unable to do so , thats Why I am asking whether group.id what I am defining is right or wrong?
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Are you getting any error ?
From where did you get this groupId of you organization ?
thumbnail
Krati Gupta, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Regular Member Beiträge: 119 Beitrittsdatum: 05.12.08 Neueste Beiträge
I am not getting any error but that web content article is not coming when new user login instead of that default terms_of_use which is their in /html/portal/terms_of_use.jsp is called.

I got Organisation groupId by following below mentioned path :

Control Panel>> Portal>> Organization>> abc (organization name ) >>now click on edit view of abc org in below left hand corner you will get group id of that org .
thumbnail
Tejas Kanani, geändert vor 11 Jahren.

RE: Terms and conditions page in liferay

Liferay Master Beiträge: 654 Beitrittsdatum: 06.01.09 Neueste Beiträge
Control Panel>> Portal>> Organization>> abc (organization name ) >>now click on edit view of abc org in below left hand corner you will get group id of that org .

That is perfectly fine.
Now check what values you are getting in your terms_of_use.jsp. Add below bold lines to check values for groupId and articleId. Are you getting both the value correct which you've set in portal-ext.properties. For the same you can modify it directly in tomcat/webapps/ROOT/html/portal/terms_of_use.jsp. And again login with a new user and check the values on the Terms Of Use Page.

[b]<%= PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_GROUP_ID %>
<%= PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_ID %>" />[/b]
<c:choose>
	<c:when test="<%= (PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_GROUP_ID > 0) &amp;&amp; Validator.isNotNull(PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_ID) %>">
		<liferay-ui:journal-article groupId="<%= PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_GROUP_ID %>" articleId="<%= PropsValues.TERMS_OF_USE_JOURNAL_ARTICLE_ID %>" />
	</c:when></c:choose>