/ Published in: PHP
Set up a basic template:
[[++site_name]] - [[*pagetitle]]
​
[[*content]]
Content:
The ACME web site is currently under development
<p>Please
// ' + 'email us' + '</a>' )
// ]]>
for all enquiries.</p>
..and set this page as the Unauthorised Page in system settings.
Put this snippet at top of every other template:
[[!UnauthorisedAccess]]
Now only web manager users logged in will be able to view the full site. Change to 'web' for web users.
Snippet code:
[[++site_name]] - [[*pagetitle]]
​
[[*content]]
Content:
The ACME web site is currently under development
<p>Please
// ' + 'email us' + '</a>' )
// ]]>
for all enquiries.</p>
..and set this page as the Unauthorised Page in system settings.
Put this snippet at top of every other template:
[[!UnauthorisedAccess]]
Now only web manager users logged in will be able to view the full site. Change to 'web' for web users.
Snippet code:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php if (!($mgrUserId = $modx->getLoginUserID('mgr'))) { $modx->sendUnauthorizedPage(); }