Tutorials
Tutorial: a school notice board
A school website where parents sign in and see the notices for their child's class only: a collection of notices, user groups per class, entries for some groups, urgent notices first, past ones dropping off by themselves, and a term-dates pop-up.
What you will build
Hillside Primary wants one notice board. A notice for everyone (a closure, sports day) shows to every parent; a notice for Year 3 (a trip) shows only to Year 3's parents. Urgent notices sit at the top, and a notice disappears once its date has passed.
- Collection
- Notices, at /notices/[slug], with the fields Title, Details, Date, Urgent.
- User groups
- Parents: Year 3, Parents: Year 4 and so on, by the member variable CVUserClass.
- Pages
- A members-only /board page listing the notices with collection cards.
1. A class variable and a group per class
- Open the website's Member Variables and press Add Variable. Type Class as the key (it becomes CVUserClass), Type Text, Default Value empty, Locked on, and press Save Variable.
- Open User Groups, press Create Group, name it Parents: Year 3. Under Required Custom Variables, add CVUserClass with the value Year 3 (values must match exactly). Leave match mode on Any rule.
- Turn on Email members when they join this group, with the subject Welcome to Year 3's notices and a short message. Press Create Group. Repeat for each class.
In the app: Website › Member Variables, User Groups
2. The Notices collection
- In the builder's Page Manager press New Page, name it Notices, choose Collection (one design, a page for each entry) as Page Type, Access Rule Members Only (Requires Login), and press Create Page.
- Open its Page Settings › Collection Fields and Add Field four times: Title (Text (one line), Required), Details (Paragraph), Date (Date (and time), Required), Urgent (True / False). Press Save Page Settings.
- Design the page: a Text with {{item.title}} as the heading, a Text with {{item.date}}, a Rich Text with {{item.details}}. Add a red Text reading Urgent and set its Role Visibility to While a collection field is set, with the field Urgent.
- Press Publish: until the collection page is published, none of its entries are on the website.
3. The board page with cards
- Create a page Board at /board with Access Rule Members Only (Requires Login).
- Add Collection Cards from Basic Elements › Layout. In its General tab, choose Notices as Collection.
- In Order and Number: Order By Date, Direction Soonest first, turn on Leave out entries whose date has passed, and Put first: Entries with Urgent on.
- In Search, Pages & Loading, set When there are no cards to No notices for your class right now. Edit the repeating Card: put {{item.title}} and {{item.date}} in it. Publish.
4. Writing notices for some classes only
- Open the website's Collections, choose Notices and press New Entry.
- Fill in Title (Year 3 trip to the museum), Details, Date and leave Urgent off.
- Under Who sees this entry, choose Only visitors in these audiences and tick Parents: Year 3.
- To post it on Monday at 8:00, leave Published on and fill Or go live at with that time. Press Save Entry.
Worked example: A closure for everyone
- New Entry: Title School closed for snow, Date tomorrow, Urgent on.
- Who sees this entry: Everyone who can open the collection. Save Entry.
- Every signed-in parent sees it first on the board until the day has passed.
In the app: Website › Collections › Notices
5. Letting parents in
- Parents sign up at /register and verify their email.
- In the website's Members, find the parent, press Edit Variables, set CVUserClass to Year 3 and press Save Variables. They join Parents: Year 3 at once and get its welcome email.
6. A term-dates pop-up
- Open Overlays, press New Overlay, name it Term dates, type Center Modal, Access Rule Members Only. Design it with a Table of the term dates and a Button with Close Current Overlay.
- In Edit Overlay turn on Open by Default: Opens on Chosen pages (Board), Opens After a delay of 2 seconds, Opens again Only until the visitor closes it, Show from the first day of term.
Take it further
Ideas to try
- A Calendar page: a second collection of events with a Countdown to {{item.date}} on each entry.
- A permission-slip form on the trip's notice, with a Signature question and statuses for the office.
- Staff-only notices: a Staff group and entries for that audience alone.