Announcement Bar - how? Help!

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
CVFM
New Member
New Member
Posts: 1
Joined: Thu Oct 26, 2023 5:02 am

Announcement Bar - how? Help!

Post by CVFM »

Hey all, this is probably really easy. I haven't used CMS Made Simple, I need to add an announcement bar and can't for the life of me see how to add this. Could someone please help me out? Thanks.
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1785
Joined: Wed Feb 25, 2009 4:25 am
Location: Victoria, BC

Re: Announcement Bar - how? Help!

Post by DIGI3 »

Specific instructions are going to be hard without knowing how your site is built, what version of cmsms you're using, and what your skill level with html/css/smarty/etc is. But generally the process would be adding the html to your main page template and styling it in your stylesheet. If you want the bar's content it to be editable by content editors, you could add a content block to the home page then use {page_attr ...} to retrieve and show the bar if the field is populated. There are also a number of modules that allow more elegant global content. One rough and basic method below, assumes you're using template inheritance.

Home page template:
{content block='announcement' label='Announcement Bar Content' assign='announcement'}

Master template:
{page_attr page='home' key='announcement' assign='announcement'}
{if $announcement}<div id="announcement">{$announcement}</div>{/if}

Style as needed. Editors can populate the announcement by editing the home page in Content Manager.
Not getting the answer you need? CMSMS support options
Post Reply

Return to “Modules/Add-Ons”