Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dennis Greiffenberg
WebContent: Configure auto-expiration by default
April 16, 2010 5:53 AM
Answer

Dennis Greiffenberg

Rank: Regular Member

Posts: 222

Join Date: April 30, 2007

Recent Posts

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
Zankar Shah
RE: WebContent: Configure auto-expiration by default
April 17, 2010 2:21 AM
Answer

Zankar Shah

Rank: Regular Member

Posts: 105

Join Date: October 3, 2007

Recent Posts

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
Fernando Garcia
RE: WebContent: Configure auto-expiration by default
August 20, 2012 3:13 PM
Answer

Fernando Garcia

Rank: New Member

Posts: 5

Join Date: April 12, 2011

Recent Posts

Hi Dennis

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

Thanks
Dennis Greiffenberg
RE: WebContent: Configure auto-expiration by default
August 20, 2012 11:28 PM
Answer

Dennis Greiffenberg

Rank: Regular Member

Posts: 222

Join Date: April 30, 2007

Recent Posts

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
RE: WebContent: Configure auto-expiration by default
August 21, 2012 3:30 AM
Answer

Josh Dezike

Rank: New Member

Posts: 1

Join Date: August 9, 2012

Recent Posts

read more about dessert recipes
Fernando Garcia
RE: WebContent: Configure auto-expiration by default
August 22, 2012 9:11 AM
Answer

Fernando Garcia

Rank: New Member

Posts: 5

Join Date: April 12, 2011

Recent Posts

Hi Dennis.

To change the expiration and review date you need to modify ext-model-hints like this:
1<model-hints>
2    <model name="com.liferay.portlet.journal.model.JournalArticle">
3        <field name="expirationDate" type="Date">
4            <hint name="default-month-delta">3</hint>
5        </field>
6    </model>
7</model-hints>
Dennis Greiffenberg
RE: WebContent: Configure auto-expiration by default
August 22, 2012 11:22 PM
Answer

Dennis Greiffenberg

Rank: Regular Member

Posts: 222

Join Date: April 30, 2007

Recent Posts

Cool! emoticon

Thanks for that information!

Best regards,
Dennis
Matthias Travis
RE: WebContent: Configure auto-expiration by default
August 24, 2012 8:34 AM
Answer

Matthias Travis

Rank: New Member

Posts: 1

Join Date: August 24, 2012

Recent Posts

romantic texting