Forum

Thread tagged as: Question

Make hidden page inaccessible by direct link

Hi there.

My client wants to make a page inaccessible temporarily. He has hidden it from the navigation group, but doesn't want it to be viewable via a direct link either.

Is there any way to do this without deleting the page? Deleting the page would be a little annoying because when he needs to use it again, he'll have to enter the content again.

Thanks.

Tim Rex

Tim Rex 0 points

  • 7 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Perch doesn't have anything magic built in for this precise scenario, no.

You can certainly create a system to do that using page attributes.

Tim Rex

Tim Rex 0 points

Can you give me a clue as to how I might do that please?

Drew McLellan

Drew McLellan 2638 points
Perch Support

Set up a page attribute to say whether or not the page is viewable.

At the top of the page (or in your top layout or similar) test for the attribute. If the page isn't viewable, us PerchSystem::redirect() to redirect away to a different page.