> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cleverschool.systems/llms.txt
> Use this file to discover all available pages before exploring further.

# Website Utilities

> Tutorials & Practical Guides

## Practical Guides

Step-by-step walkthroughs to help school business managers, website administrators, department heads, and web developers operate and integrate the Website Utilities module with maximum efficiency.

***

### Guide 1: Configuring Central Office Email & Message Routing

`Website Managers` configure the global school administration email settings that control how parent and public inquiries are routed:

**1. Navigate to Contacts Management**

From the main navigation sidebar, select **Website** > **Contacts** (or navigate to `/website/contacts`).

**2. Open Settings Modal**

Click the **Manage** / configuration icon at the top right of the contacts table header.

**3. Configure School Administration Parameters**

* **School Admin Email**: Enter the official, monitored central office email address (e.g. `office@cleverschool.test`).
* **School Admin Title**: Enter your school's formal display title (e.g. `St Clevers High School Office`).

**4. Save and Apply**

Click **Save**. The configuration is saved instantly to the tenant configuration.

> [!TIP]
>
> Every submission through the public contact form (`/contact`) is automatically carbon-copied (`CC`) to this address, and the `Reply-To` header is set to this inbox so that staff responses flow through the central office.

***

### Guide 2: Creating, Editing & Reordering Staff Contacts

Organise your staff directory into clear departmental groups with custom display order:

> [accordion] Adding a New Contact
>
> 1. On the **Website Contacts** page (`/website/contacts`), click **Add a new contact**.
> 2. In the modal:
>    * **Name**: Enter the staff member's title and full name (e.g. `Mrs S. Jenkins` or `Admissions Team`).
>    * **Group**: Enter or select a departmental group (e.g. *Senior Leadership*, *Pastoral & Heads of Year*, *SENDCo*, *Administrative Team*).
>    * **Email**: Enter their school email address.
>    * **Send Direct**: Keep checked if inquiries should be emailed directly to this address.
> 3. Click **Save**. The contact is immediately available in the directory and public dropdown list.

> [accordion] Reordering Contacts within Groups
>
> * `Website Managers` can adjust the display order of contacts within each group.
> * Click and hold the drag handle icon on the left of any contact row and move it to your desired position.
> * The new order is automatically saved and immediately updates the public contact form and JSON feeds.

> [accordion] Auditing Live User Account Statuses
>
> Review the **Status** column badge for each contact:
>
> * User (Green): Successfully linked to an active Cleverschool user.
> * Not a user (Red): Email does not match any registered staff member. Check for typos or create their user account in **Administration** > **Staff**.
> * Archived user (Orange): The staff member's account has been archived or soft-deleted. Delete or update the contact to avoid missed inquiries.

> [accordion] Deleting Contacts
>
> * **Single Delete**: Click the trash icon on the contact row, confirm the prompt, and click **Delete**.
> * **Bulk Delete**: Select multiple rows using the checkboxes on the left, click **Delete Selected**, and confirm.

***

### Guide 3: Bulk Importing & Exporting Contacts via Spreadsheet

Quickly populate or update your entire school staff directory using Microsoft Excel or CSV spreadsheets:

**1. Open Import Dialogue**

On the **Website Contacts** page (`/website/contacts`), click the **Import Contacts** button in the top action bar.

**2. Download Blank Template**

Click **Download Template** (`contacts-blank.xlsx`) to obtain the official spreadsheet layout.

**3. Populate Your Spreadsheet**

Ensure your spreadsheet includes the required column headers:

* `name`: Staff or department display name (e.g. `Mr David Hughes`).
* `email`: School email address (e.g. `d.hughes@cleverschool.test`).
* `group`: Department category (e.g. `Pastoral Leads`).
* `email_direct`: `1` or `true` to enable direct email notifications, or `0` / `false` to route solely via central office.

**4. Upload & Validate**

Choose your spreadsheet file (`.xlsx`, `.xls`, or `.csv`). The system validates headings and previews rows. Click **Import** to commit the records into the directory.

> [!TIP]
>
> To export existing contacts for auditing or offline backup, select individual contacts (or check the header box for all) and click **Export Selected** to download `contacts.xlsx`.

***

### Guide 4: Scheduling Word of the Week Entries & Translations

Curate rich vocabulary terms with definitions, contextual sentences, and foreign language translations:

**1. Open Words Management**

Navigate to **Website** > **Words** (`/website/words`).

**2. Add a New Word**

Click **Add a new word** in the top action bar.

**3. Enter Word Attributes**

* **Word**: The vocabulary term (e.g. `Resilience`).
* **Meaning**: Educational or dictionary definition (e.g. `The capacity to recover quickly from difficulties; toughness.`).
* **Example**: Illustrative sentence showing proper usage (e.g. `Students demonstrated great resilience during exam preparations.`).
* **Language 1 (Optional)**: First translation into a modern foreign or community language (e.g. `Résilience (French)`).
* **Language 2 (Optional)**: Second translation (e.g. `Resiliencia (Spanish)`).
* **Show From**: The activation date.

> [!TIP]
>
> The system automatically calculates and pre-populates the next consecutive Monday/Sunday (`+7 days`) based on the latest scheduled word in your registry.

**4. Save and Confirm**

Click **Save**. The word is queued in the registry and will automatically become live on its scheduled `show_from` date.

> [!NOTE]
>
> Use the **Toggle Old Words** button in the table header to switch between viewing only upcoming future words or displaying the full chronological archive.

***

### Guide 5: Bulk Importing & Exporting Words via Spreadsheet

Plan and upload a full academic year's vocabulary curriculum in minutes:

**1. Open Import Dialogue**

On the **Website Words** page (`/website/words`), click **Import Words**.

**2. Download Blank Template**

Click **Download Template** (`words-blank.xlsx`) to obtain the pre-formatted Excel template.

**3. Fill in Curriculum Words**

Populate the template columns:

* `word`: The target vocabulary term.
* `meaning`: Definition of the word.
* `example`: Context sentence.
* `lang1`: Language 1 translation.
* `lang2`: Language 2 translation.
* `show_from`: Scheduled start date formatted as `YYYY-MM-DD` or Excel date (if left blank, the system automatically assigns consecutive weekly dates starting from your next available slot).

**4. Upload & Import**

Select your file and click **Import**. Cleverschool validates all entries and clears cached feeds so your latest schedule is immediately active.

***

### Guide 6: Integrating the Public Staff Contact Form

Deploy the public contact form (`/contact`) on your school website while maintaining multi-layered bot protection:

> [tab] Direct Link & Navigation Integration
>
> Add a direct navigation button or link on your school website's Contact Us page pointing to:
>
> ```text theme={null}
> https://[your-school].cleverschool.systems/contact
> ```
>
> When parents visit this URL, they are presented with a clean, branded portal displaying your school logo, staff selection dropdown, and message form.

> [tab] iFrame Embedding
>
> To embed the contact form directly within your school website page (WordPress, Webflow, Squarespace):
>
> ```html theme={null}
> <iframe
>     src="https://[your-school].cleverschool.systems/contact"
>     width="100%"
>     height="720px"
>     frameborder="0"
>     style="border: none; max-width: 600px; margin: 0 auto; display: block;"
>     title="School Staff Contact Form"
> ></iframe>
> ```

> [tab] Security & Anti-Bot Protection
>
> The contact form incorporates three independent layers of security:
>
> 1. **Cloudflare Turnstile CAPTCHA**: Performs non-intrusive bot verification without frustrating puzzles or image selections.
> 2. **Honeypot Trap**: Silently rejects automated submissions from bots that populate hidden form fields.
> 3. **Rate Limiting**: Limits submissions to one per minute per IP address, preventing form flooding attacks.

***

### Guide 7: Integrating JSON Feeds on Your School Website

Developers can query Cleverschool JSON endpoints using lightweight client-side JavaScript (Fetch API) or server-side scripts (PHP / Node.js) to display dynamic widgets:

> [tab] Word of the Week Widget (JavaScript)
>
> Add a dynamic Word of the Week banner to your school website homepage:
>
> ```html theme={null}
> <div id="word-of-the-week" class="school-widget">
>     <h3 id="wotw-word">Loading Word of the Week...</h3>
>     <p id="wotw-meaning"></p>
>     <blockquote id="wotw-example"></blockquote>
>     <p id="wotw-translations" style="font-style: italic; color: #555;"></p>
> </div>
>
> <script>
> fetch('https://[your-school].cleverschool.systems/website/words/current', {
>     headers: { 'Accept': 'application/json' }
> })
> .then(response => response.json())
> .then(data => {
>     if (data && data.word) {
>         document.getElementById('wotw-word').textContent = data.word;
>         document.getElementById('wotw-meaning').textContent = data.meaning;
>         document.getElementById('wotw-example').textContent = '"' + data.example + '"';
>
>         let trans = [];
>         if (data.lang1) trans.push(data.lang1);
>         if (data.lang2) trans.push(data.lang2);
>         document.getElementById('wotw-translations').textContent = trans.join(' • ');
>     }
> })
> .catch(err => console.error('Error loading Word of the Week:', err));
> </script>
> ```

> [tab] Dynamic Staff Directory (JavaScript)
>
> Render a live staff contact directory grouped by department:
>
> ```html theme={null}
> <div id="staff-directory"></div>
>
> <script>
> fetch('https://[your-school].cleverschool.systems/website/contacts/list', {
>     headers: { 'Accept': 'application/json' }
> })
> .then(response => response.json())
> .then(contacts => {
>     const container = document.getElementById('staff-directory');
>     let currentGroup = '';
>
>     contacts.forEach(contact => {
>         if (contact.group !== currentGroup) {
>             currentGroup = contact.group;
>             const groupHeading = document.createElement('h3');
>             groupHeading.textContent = currentGroup || 'General Staff';
>             container.appendChild(groupHeading);
>         }
>
>         const contactItem = document.createElement('div');
>         contactItem.className = 'contact-card';
>         contactItem.innerHTML = `<strong>${contact.name}</strong>`;
>         container.appendChild(contactItem);
>     });
> })
> .catch(err => console.error('Error loading staff directory:', err));
> </script>
> ```

***

### Guide 8: Stock Health Monitoring & Automated Alert Resolution

Understand how automated monitoring prevents website content from going stale:

> [accordion] Interpreting Vocabulary Stock Counters
>
> At the top of the **Website Words** dashboard (`/website/words`), the stock counter displays the number of future scheduled words:
>
> * **Green Badge (> 9 words)**: Excellent stock. Your website is provisioned for over two months of continuous weekly updates.
> * **Orange Badge (4–9 words)**: Moderate stock. You have approximately 1 to 2 months of content remaining. Consider scheduling upcoming term words.
> * **Red Badge (0–3 words)**: Critical low stock. Less than one month of words remaining.

> [accordion] Resolving Low Stock Alerts (WebsiteWordsReminder)
>
> * Every Tuesday at 11:55, Cleverschool checks whether your future word schedule extends at least one month ahead.
> * If fewer than four weeks of future words exist, all `Website Managers` receive an automated alert email.
> * **To Resolve**: Click the **Add more words** link in the email or navigate to `/website/words` and add or import additional vocabulary entries.

> [accordion] Resolving Missing Manager Alerts (WebsiteManagerMissing)
>
> * If system administrators receive an alert stating that no active `Website Manager` exists, navigate to **Administration** > **Staff**.
> * Locate the designated staff member and assign the `Website Manager` role.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.