Group specific Banner Topics?

I have a situation where I want to display different Banner Topics dependent on the users group membership. Namely, I’d like to show one banner if a user isn’t logged in and a different one if they are but aren’t a part of a specific group.

I could likely set up categories to target the two sectors but is it possible to target users with specific Banner Topics? I’d rather not build a customization to do it but I’m also not tossing that idea.

I saw how to hide a banner from anonymous users, but not how to show two different banners.

I worry that this would be extremely confusing from an admin perspective. I would need a completely new UI to support configuring this without enormous amounts of admin confusion.

One hacky possibility with minimal change would be to have one big banner for everyone and then use CSS to hide bits.

That was my concern as well. It would be a pain to manage as an admin. I just wondered if it was even possible.

I may give this a try as it seems much quicker and easier than building the full customization via plugin. But last I knew, we couldn’t apply CSS classes or ids via the composer. Outside of using an nth-selector, is there another way to do this?

I know you can do it for anon versus logged in, but I’m not sure you can achieve it via Groups. As to my knowledge there is no high-level (on the html or body tag) CSS class denoting the group the user is a part of.

Yeah it is not going to be easy, nth selector is what you are going to be forced to use. Otherwise you are going to be forced to whitelist stuff for everyone.

Thanks, @sam and @cpradio. I think my plan of attack will be to add the group names to the body/html classes and follow down to the nth div of the banner topic. :thumbsup:

Are you going to use :nth-child () selector?

But how to add group names to the body/html classes? Can you give me an example?

Ended up going a different route entirely. I built a custom theme that inserts the pieces I need as a header. The theme did all the work I needed.

이 문제를 파헤쳐 보고 있습니다

현재는 모든 고객을 위한 고객 카테고리가 있으며, 각 개별 고객을 위한 하위 카테고리도 있습니다.
이제 고객 그룹에 속한 사용자만 볼 수 있는 배너 토픽을 표시하는 방법을 찾고 있습니다.

혹시 이 문제를 우회할 수 있는 방법을 찾으신 분이 계신가요?

CSS를 사용하여 숨기는 것은 불행히도 선택지가 아닙니다. 인스펙트 도구로 콘텐츠에 접근할 수 없도록 해야 하기 때문입니다.

이 플러그인이 작동할지 확실하지 않지만, 플러그인 작성자는 훌륭하며 기능 요청을 고려해 볼 수도 있습니다.