-
- 6 Posts
On a live site (yes, I know, I should back-up and do this locally) I'd like to add a div that only I - or anyone else with high enough priveleges - can see when logged into the manager.
All documentation I've come across seems to be concerned with admin pages, rather than areas within pages. Is this easily accomplished?
[ed. note: chris. last edited this post 12 years, 6 months ago.]
-
- 24,544 Posts
That would do it. A full version might look like this:
<?php
/* ShowMyStuff snippet */
$output = "";
if ($modx->user->isAuthenticated('web')
&& $modx->user->isMember('Administrator')
&& $modx->user->get('username') == 'MyUserName'
) {
$output = $modx->getChunk('SomeChunk');
}
return $output;
-
- 6 Posts
Thanks to you both - I'll admit though, the first example had me a little perplexed.
I appreciate the elaboration.
-
- 134 Posts
Well, Bob is the one who writes the books,.. btw, Bob, ye olde Germany is waiting for yours with blood shot eyes! Any day now...
@itWilllBeOK