Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Remove CSS Class on all but one page

I am trying to create a simple CSS class that is only visible on one page and hidden on the rest.

This is what I have...

`.homepage .discussions #fromtext{
display: none;
}

.pageID434 #fromtext{
display:block;
}`

As you can see I am lost with the page IDs.

Comments

  • Options
    R_JR_J Ex-Fanboy Munich Admin

    You need to be a little more specific. Should it be only one special discussion? That is not possible by css.

    There is a div#Discussion_36138 here which is your discussion item.

    You have three options: Javascript, PHP or rethinking your idea.

    You can create either a custom theme or a plugin with a method like that (given that we are really talking about one special discussion):

    public function discussionController_render_before($sender, $args) {
        if (val('DiscussionID', $args) != 36138) {
            return;
        }
        $sender->Head->addTag('style', [], '#fromtext{display:block;}');
    }
    

    That code is untested but shows the way to solve your problem

Sign In or Register to comment.