掲示板

Terms and conditions page in liferay

11年前 に Abhi Ed によって更新されました。

Terms and conditions page in liferay

Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿
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
11年前 に David H Nebinger によって更新されました。

RE: Terms and conditions page in liferay

Liferay Legend 投稿: 14916 参加年月日: 06/09/02 最新の投稿
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
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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
11年前 に Sachin Mane によって更新されました。

RE: Terms and conditions page in liferay

Junior Member 投稿: 76 参加年月日: 12/04/10 最新の投稿
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.
11年前 に Abhi Ed によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿
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
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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)

添付ファイル:

11年前 に Abhi Ed によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿
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
11年前 に Hitoshi Ozawa によって更新されました。

RE: Terms and conditions page in liferay

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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
11年前 に Hitoshi Ozawa によって更新されました。

RE: Terms and conditions page in liferay

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
Only one name starts with sites and that is Sites Template


Below "Users, User Groups and Organizations" there should be "Sites and Teams"
11年前 に Abhi Ed によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿
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
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
If you are using Liferay 6.0. Then it should be Communities instead of Sites.
thumbnail
11年前 に Hitoshi Ozawa によって更新されました。

RE: Terms and conditions page in liferay

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
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.
11年前 に Abhi Ed によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 118 参加年月日: 12/06/04 最新の投稿
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
11年前 に Krati Gupta によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
Hi All,

I am using Liferay 5.2.3 , so please tell me how will I get the group.id
thumbnail
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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
11年前 に Krati Gupta によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
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
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
Are you getting any error ?
From where did you get this groupId of you organization ?
thumbnail
11年前 に Krati Gupta によって更新されました。

RE: Terms and conditions page in liferay

Regular Member 投稿: 119 参加年月日: 08/12/05 最新の投稿
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
11年前 に Tejas Kanani によって更新されました。

RE: Terms and conditions page in liferay

Liferay Master 投稿: 654 参加年月日: 09/01/06 最新の投稿
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>