留言板

WebContent: Configure auto-expiration by default

thumbnail
Dennis Greiffenberg,修改在14 年前。

WebContent: Configure auto-expiration by default

Regular Member 帖子: 222 加入日期: 07-4-30 最近的帖子
Hi all,

Liferay's default behaviour is as follows: WebContent is infinitely valid (once approved). This can be changed on individual basis (i.e. per WebContent). Once the appropriate selectbox is deactivated, a date-field becomes active. The default expiration time for an article is one year in advance.

My question is as follows: Can the default behaviour configured the otherway round. So WebContent, by default, does expire? And if so: Can the period be tweaked as well, say I don't want content to be valid for a years time but only for four weeks?

...or is that something that I would have to change by means of programming?
And if so: Where?

Any hint / help is greatly appreciated!

Best regards,
Dennis
thumbnail
Zankar Shah,修改在14 年前。

RE: WebContent: Configure auto-expiration by default

Regular Member 帖子: 106 加入日期: 07-10-3 最近的帖子
You will have to definitely change the JSP to get your requirement. If you have downloaded liferay source, you can go to portal-web/docroot/html/portlet/journal. The source JSPs are there. If you want to change that you can use hooks for that purpose
thumbnail
Fernando Garcia,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

New Member 帖子: 13 加入日期: 11-4-12 最近的帖子
Hi Dennis

I'm facing the same problem and I was wondering if you solved the problem and how you did it ?

Thanks
thumbnail
Dennis Greiffenberg,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

Regular Member 帖子: 222 加入日期: 07-4-30 最近的帖子
Hi Fernando,

I think I never really finished this one off (the post is quite some time ago.. ;-) ), but I guess Zankar's suggestion is the right way to follow...

Best regards,
Dennis
Josh Dezike,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

New Member 发布: 1 加入日期: 12-8-9 最近的帖子
thumbnail
Fernando Garcia,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

New Member 帖子: 13 加入日期: 11-4-12 最近的帖子
Hi Dennis.

To change the expiration and review date you need to modify ext-model-hints like this:
<model-hints>
	<model name="com.liferay.portlet.journal.model.JournalArticle">
		<field name="expirationDate" type="Date">
			<hint name="default-month-delta">3</hint>
		</field>
	</model>
</model-hints>
thumbnail
Dennis Greiffenberg,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

Regular Member 帖子: 222 加入日期: 07-4-30 最近的帖子
Cool! emoticon

Thanks for that information!

Best regards,
Dennis
Matthias Travis,修改在11 年前。

RE: WebContent: Configure auto-expiration by default

New Member 发布: 1 加入日期: 12-8-24 最近的帖子