Jump to content

How to hide a block on Topic Posting page?


WebCMS

Recommended Posts

I added a WYSIWYG editor to Forums topic-view page but the same editor content is getting rendered on Post Topic page too.

I need to hide this block on Topic Posting page as it is specific to topic-view page only. How do I hide it on Topic Posting page without having to edit templates?

There is no CSS ID set for the div and both pages use the same CSS class for the div and no way to select it to hide it using CSS. Hiding the block using CSS is hiding it on both pages and deleting the block is removing it from both pages as both pages use the exact same block.

It would give us more control if you use ID's for elements in addition to classes on pages, similar to:

<div id="topicViewBlock" class="topicBlock">

<div id="topicPostBlock" class="topicBlock">

Any ideas...?

Edited by WebCMS
Link to comment
Share on other sites

I'm just posting to follow this topic, because I don't think there is a way, but sometimes I am surprised by an answer.

But as far as I know, you don't have that kind of granular control with your blocks. If you add a block to your Pages, it shows up on ALL those pages. If you add a block to Gallery or Downloads, it shows on ALL subsequent links under those apps. Likewise, any block on a topic shows on all topics, in one forum shows on all forums, etc.

But, I am eager to hear I am wrong, so I will wait in anticipation 🙂

Link to comment
Share on other sites

32 minutes ago, Robert Angle said:

I'm just posting to follow this topic, because I don't think there is a way, but sometimes I am surprised by an answer.

But as far as I know, you don't have that kind of granular control with your blocks. If you add a block to your Pages, it shows up on ALL those pages. If you add a block to Gallery or Downloads, it shows on ALL subsequent links under those apps. Likewise, any block on a topic shows on all topics, in one forum shows on all forums, etc.

But, I am eager to hear I am wrong, so I will wait in anticipation 🙂

Adding a block to a forum and it showing on other forums is fine which is expected behavior.

I was referring to adding a block topic view list page but the same shows on topic posting form page. In such a case, we need element IDs to have some control to be able to CSS-select them to manage their visibility and such without tweaking the templates. Adding element ID's is just HTML attribute, won't add any extended functionality or break anything or need any testing as long as they are unique.

In our case, the block is meant purely for topic view list (home) page and it gets rendered on topic posting form page. Also, it is bigger than intended because there is no sidebar panel on topic posting page which is a double bummer.

Why would we not have element IDs? After all, that is their purpose. CSS class will not serve the purpose in this case.

Link to comment
Share on other sites

7 minutes ago, Robert Angle said:

This doesn't happen on my installation(s) at all. I have blocks on the topic-list page, but my start-a-topic form/page has no blocks whatsoever.

The exact same blocks from topic list page would appear on start-a-topic form page.

Maybe you created a custom page for topic listing?

Link to comment
Share on other sites

17 minutes ago, WebCMS said:

The exact same blocks from topic list page would appear on start-a-topic form page.

Maybe you created a custom page for topic listing?

No, I see what you are saying now.

For me, the none of the sidebar blocks from the topic-list page will show on the start-a-topic form page. However, any blocks on in the header and footer of the main page do carry over to the start-a-topic page, which is probably what you are referring to. 

Link to comment
Share on other sites

On 12/26/2023 at 8:15 PM, WebCMS said:

I need to hide this block on Topic Posting page as it is specific to topic-view page only. How do I hide it on Topic Posting page without having to edit templates?

You might have to Edit the templates.

I actually Edit my own [child] templates, and keep a written record of my changes.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...