Forum Discussion

wrighte's avatar
wrighte
Expert
14 years ago

Limiting display of annoucement to home page

Is there a way to limit diplay of an annoucement to only the homepage (or more specifically to the "Top" Category only - we use that as our homepage).

 

I guess we could create a separate custom content module for this?

  • Hi Eric,

     

    Here are the ways that I know of to accomplish this:

     

    1. Define separate announcements for the various levels of the community such that the announcement at the community level does not cascade down to lower levels.
    2. Remove the Announcements module via Studio from the pages that you don't want it to display on.
    3. Utilize a custom content module rather than the Announcements module and only place it on the pages where you wish to display the announcement.

    There may be some other work-arounds, but these are the most commonly-used.

     

    Take care,

5 Replies

  • BrianO's avatar
    BrianO
    Lithium Alumni (Retired)
    14 years ago

    Hi Eric,

     

    Here are the ways that I know of to accomplish this:

     

    1. Define separate announcements for the various levels of the community such that the announcement at the community level does not cascade down to lower levels.
    2. Remove the Announcements module via Studio from the pages that you don't want it to display on.
    3. Utilize a custom content module rather than the Announcements module and only place it on the pages where you wish to display the announcement.

    There may be some other work-arounds, but these are the most commonly-used.

     

    Take care,

  • Wendy_S's avatar
    Wendy_S
    Boss
    13 years ago

    Hey Eric.

    We have custom content for this as well and rotate announcements using graphics.

    Not sure how familiar you are with HTML though but let me know if I can help

  • xorrkaz's avatar
    xorrkaz
    Genius
    13 years ago

    Here's the CSS content we used inside the announcement widget to prevent child announcement widgets from showing up when we didn't want top-level content to cascade down.

     

    <style>
    .lia-component-common-widget-announcement {
        display: none;
    }
    </style>

     

    Stick that in any category announcement section where you want the widget to be completely hidden.

  • KaelaC's avatar
    KaelaC
    Lithium Alumni (Retired)
    13 years ago

    You could also get fancy with your CSS and do this

    <style>
    #lia-body .lia-component-common-widget-announcement {
        display: none;
    }
    #lia-body.CategoryPage .lia-component-common-widget-announcement {
        display: block;
    }
    </style>

     That will only show annoncements on your Category pages.  Of course if you have sub-categories it will show up there as well.  If you want to know how to only make it show on some category pages, we would need trickier code.