Hi there,
I just created a set of rules for my client to hide some manager forms (all the ressource setings etc.)
Unfortunately, I cant hide the SEO-Tab, which is part of Menno Pietersens Extra "Flexibility".
Can someone please point me to the right direction?
Cheers,
Guido
The SEO tab comes from the aptly named SEOTab extra. If you don't want it, you could disable the plugin or remove the extra. I'm not sure to what extent the Flexibility theme depends on it though, so you might need to make some template changes after that.
Hi Mark,
thank you for your input on this. I will look into it if I can disable the extra.
-
- 353 Posts
I believe you could trigger a plugin BEFORE StercSeo is triggered and use it toogle StercSeo on/off.
This is just an idea, try it and send me a message if I made a fool out of my self...
<?php
/*
Toggle StercSeo
trigger plugin on these events
------------------------------
OnBeforeDocFormSave
OnDocFormPrerender
OnHandleRequest
OnLoadWebDocument
OnPageNotFound
Set priority to 0
Change the priority of these events for StercSeo to a higher value (1).
*/
/* --------------------------- */
// Change pluginID to fit the id
// of your StercSeo PLugin.
$pluginId = 15;
/* --------------------------- */
$user = $modx->user;
if($user->isMember('Staff')){ // or any other check
$disabled = 1;
}
else{
$disabled = 0;
}
$criteria = array('id'=> $pluginId);
$plugin = $modx->getObject('modPlugin',$criteria);
$plugin->set('disabled', $disabled);
$plugin->save();
return;
Edit: Fixed a type at the bottom.