on 02-06-2015 5:40 AM
Hi,
I have a problem with adding the CMSTimeRestriction to the page.
I am using version 5.3. We have a CustomContentPage extending the ContentPage type. There is a requirement of putting the Time based restriction to CustomContentPage i..e for a specific period, page should be visible and when time/date expires page should not be available on the site.
For this,
I have added the the CustomContentPage to the CMSTimeRestriction under the AssignedPageTypes section
Through CMSCockpit, i opened the page in the edit mode, and added one CMSTimeRestriction instance to the page.
But somehow, this restriction is not getting applied and page is visible on the site.
Regards,
Pankaj
I'm guessing you've still got it selected as the default page. (The defaultPage
attribute of AbstractPage
)
With a content page it will get the page by label and will always show the first default page even if there are restrictions.
If you want it to not show when the restriction applies the set the defaultPage
attribute to false and you'll get a CMSItemNotFoundException
instead. Be aware that the page won't show in the cmscockpit with the standard search filter of only showing default pages.
If you want a different page to show when the restriction doesn't match then create another content page with the same label but with defaultPage
set to true.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.