Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#25 2007-11-25 17:46:59
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: Better support for "static pages" by hiding sections on the write tab
Alesh,
I think I found a solution to your initial question.
replace
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.'>'.htmlspecialchars($alabel).'</option>';
with
$out[] = n.t.'<option value="'.htmlspecialchars($avalue).'"'.$sel.' class="option_'.htmlspecialchars($avalue).'"'.'>'.htmlspecialchars($alabel).'</option>';
around line 80 in txplib_forms.
This will simply add a class=“option_(section name)” to every item in the section dropdown of the “write” tab (and also in any other dropdown in txp interface).
Now you can hide a section via css adding in your textpattern.css something like
option.option_about
{
display:none;
}
Note that I used the prefix “option_” to avoid any possible conflict with other class names.
That’s all, usually I tend to avoid hacks but I think this won’t do any harm.
Last edited by redbot (2007-11-26 01:17:22)
Offline
Re: Better support for "static pages" by hiding sections on the write tab
I have used the one post per section another time and I think this is a great idea. But I am also patient enough to wait for it to be implemented.
Reading over this thread (as well as some of the others) it sometimes seems like the disconnect isn’t whether or not a feature will make it into 4.0.x but rather is it something the developers are interested in pursuing at all.
Offline
#27 2009-07-10 07:57:11
- divan
- New Member
- From: Ukraine
- Registered: 2009-04-30
- Posts: 7
Re: Better support for "static pages" by hiding sections on the write tab
And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.
Offline
Re: Better support for "static pages" by hiding sections on the write tab
divan wrote:
And how about setting privileges for various writers on sections? For example, I have sections ‘news’ and ‘articles’ on the site, and I want to give some writer an ability to write only to ‘news’ section.
the hide in admin plugin hides back end interface elements from users other than admins. So if you have your “news” as default you’d have that ability.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline