Slides Management¶
This chapter explains how to manage homepage slides in the LabPress administration panel. Slides are the large banner images displayed in the rotating carousel at the top of the homepage.
The guide focuses on practical operations: adding, editing, deleting, and ordering slides through the admin interface. It also describes how slides are loaded on the frontend and how multilingual content can be applied.
1. Overview¶
The Slides module controls the homepage carousel. Each slide consists of an image, a title, a short description, and a sort order. The homepage displays these slides as a rotating banner with automatic transition and manual navigation indicators.
All slide data is stored in the slides table. The admin panel provides a dedicated management page that allows administrators to maintain the carousel content without editing the database directly.

Figure 1. The Slides manager. Each row corresponds to one carousel record.
2. Accessing the Slides Manager¶
The Slides manager is available from the admin sidebar under Slides.
Access to this page requires the slides permission. Administrator accounts with the all permission can also access it. Users without the required permission will see a permission error message.
To open the page, click Slides in the sidebar. The page displays a table containing all existing slides.
3. Slide Workflow at a Glance¶
flowchart LR
A[Add or Edit modal] --> B[api/upload.php]
B --> C[uploads/slides/]
A --> D[api/save.php<br/>type=slides]
D --> E[(slides table)]
E --> F[index.php carousel]
E --> G[api/data.php?type=slides]
G --> F The slide record stores the image path, title, description, and sort order. The carousel uses the API as its data source; the static markup in index.php is only a fallback for an empty or unavailable API response.
4. Understanding the Slide List¶
The slide list shows the following columns:
- Preview – a small thumbnail of the slide image.
- Title – the main heading displayed on the slide.
- Actions – buttons for editing and deleting the slide.
The list is ordered by the sort_order field, with lower values appearing first in the carousel. If no slides have been added, the page displays a “No data” message.

Figure 2. The list view. Thumbnails are loaded from the stored image path; a missing file produces a broken preview.
5. Adding a Slide¶
To add a new slide:
- Open the Slides page.
- Click the Add Slide button at the top of the table.
- In the modal form that appears, fill in the following fields:
| Field | Description |
|---|---|
| Title | The main heading displayed on the slide. This field is required. |
| Description | A short supporting text displayed below the title. This field is required. |
| Image | The background image for the slide. Upload an image using the file picker. |
| Sort | A numeric value that controls the order of the slide in the carousel. Lower values appear first. |
- Click Save.
The new slide is inserted into the database and will appear in the homepage carousel after the next page load.
5.1 Uploading a Slide Image¶
The slide form includes an image upload field. When you select an image file, the browser uploads it to the server through the api/upload.php endpoint.
The upload process:
- Select an image file from your computer.
- The system uploads the image to the
uploads/slides/directory. - If the upload succeeds, a preview is displayed in the form.
- The image path is stored in the hidden form field.
Supported image types include JPG, PNG, GIF, and WebP. The maximum file size is determined by the server’s PHP configuration.

Figure 3. The add form. Uploading an image writes to
uploads/slides/and stores the returned path in the form.
6. Editing a Slide¶
To modify an existing slide:
- Find the slide you want to change in the slide list.
- Click the Edit button in that row.
- The same modal form opens with the current values filled in.
- Update the title, description, image, or sort order.
- Click Save.
If you need to replace the existing image, use the file picker to upload a new image. The new image will replace the previous one after saving. 
Figure 4. The edit form. Replacing the image only changes the record after the modal is saved.
7. Deleting a Slide¶
To remove a slide:
- Find the slide in the slide list.
- Click the Delete button in that row.
- Confirm the deletion when prompted.
The slide is permanently removed from the database. The image file itself may remain in the uploads directory, but the slide will no longer be shown in the carousel.
If you want to temporarily hide a slide without deleting it, consider changing its sort order to a very high value or replacing its content later, as there is currently no separate active/inactive switch in this module.
8. Controlling Slide Order¶
The order of slides is controlled by the Sort field. Lower values appear earlier in the carousel.
The homepage loads slides using the following database query:
The carousel then cycles through the slides in this order. To rearrange slides, edit each slide and adjust its sort value. It is recommended to use increments of ten (10, 20, 30, etc.) so that future insertions are easier.
9. Frontend Display¶
The homepage carousel is rendered by index.php and the JavaScript file assets/js/index.js.
The frontend attempts to load slide data asynchronously from the API endpoint api/data.php?type=slides. If the API returns slides, the JavaScript dynamically builds the carousel HTML and replaces any static fallback slides.
Each slide is displayed with its title and description overlaid on the background image. The carousel automatically advances every few seconds and includes navigation indicators that users can click to jump to a specific slide.
If the API request fails or no slides are found, the frontend falls back to the static slides defined in the homepage HTML. However, the static slides are only a fallback and should not be relied upon for production content. 
Figure 5. The frontend carousel. The API supplies slide data; the carousel advances automatically and supports indicator navigation.
10. Multilingual Support¶
Slide titles and descriptions are stored as raw text in the database. The Dynamic Multi-Language plugin can translate these fields without modifying the original content.
The plugin registers the slides_data filter, which is applied when the homepage loads slide data. It retrieves translations from the ml_translations table and replaces the title and description if a translation exists for the current locale.
To manage slide translations:
- Open the Dynamic Multi-Language admin page.
- Go to the Slides tab.
- For each slide, enter the translated title and description for the target language.
- Save the translations.
When the frontend language is switched, the translated slide content appears automatically. 
Figure 6. Slide titles and descriptions are edited in the plugin's Slides tab; the original record remains untouched.
11. Operational Checks¶
- Every slide has a readable image path under
uploads/slides/. - The title and description fit the carousel overlay at mobile and desktop widths.
- The sort order is unique enough that the intended first slide is deterministic.
- The API returns the same number of slides as the admin list.
- The static fallback is not being mistaken for live content.
If the carousel shows old content after saving, check the browser cache and any page cache before changing the database. If it shows no slides, request api/data.php?type=slides directly and inspect the JSON response.
12. Next Steps¶
After managing slides, you may want to continue with:
- Publications – manage academic publications.
- Tools – manage bioinformatics tools and software.
- Projects – manage research projects.
- Research News – manage laboratory news.
- Site Settings – configure the homepage sections that work together with the slides.