Do the topic-list page and topic page have an id?


(Pad Pors) #1

so that you can easily add-remove other div’s to them separately? e.g. you want to add an image to all the topic-pages, how do you do that?

or for example, to remove banner from topic-page, i could use

div.regular #banner { display: none; }

and it works, but then to remove global-alert from the topic page this doesn’t work:

div.regular .alert { display: none; }

is there a simple way?


(cpradio) #2

For the global alert, try

body.archetype-regular .alert { display: none; }

(Pad Pors) #3

thanks for the fast working reply. :slight_smile:

stupid question: where may i find out about the architecture?

the ways i tried were looking for term: topic-list or topic in the files on local host, plus looking at the “inspect element” terms and see if there is any difference between the topic page and the topic-list page.


(cpradio) #4

I simply did an inspect element to see if there were any denotable differences. The first being that .alert isn’t inside the div.regular tag. But there was a class on the body tag that was differing from homepage to an actual topic page. So I went with that.


(Pad Pors) #5

hmmm, strangely this line of code doesn’t work all the time:

body.archetype-regular .alert { display: none; }

I mean it worked last night, but not now!

i’m using this for all the categories, to remove alert from the topic pages:

.category-support #main .alert-global-notice { display: none !important; }

any better way to do that?


(cpradio) #6

Do you have a link of where it isn’t working? Might help me diagnose it.


(Pad Pors) #7

thanks, this is a topic of our forum:

currently i only use the command:

.body.archetype-regular .alert { display: none; }

and the alert is shown on the top of the page.


(cpradio) #8

Okay, I’m going to have to dig into this further. The archetype-regular isn’t getting set. I’m not sure how that gets determined.


(Pad Pors) #9

thanks. the category-specific removal works for the moment, though it;s little bit stupid :sweat:

the other way should be good as well:

is it possible to call the topic-list page? is there any id for the topic-list page? then one can call it and ask the banner or the alert to appear only there.


(cpradio) #10

Unfortunately, there isn’t.


(cpradio) #11

@eviltrout, it seems that the archetype class only gets added when you change archetypes, such as, going from the Topic List to a Topic, it creates the archetype change and thus adds the archetype-regular to the body element.

However, if you refresh the topic (as if it visit the topic directly), the class disappears.

Thoughts?

Here is the relevant file


(Robin Ward) #12

Here’s a fix:

Curiously, I think we might have two ways of applying the archetype class to a topic - I think it gets added as .archetype-kittens as well as just .kittens

I’m not sure why we do that!