feat: enhance menu management with three-level hierarchy support, additional metadata fields, and utility scripts for data extraction
This commit is contained in:
@@ -29,3 +29,16 @@ Use the following exact structure as a template:
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
### Dynamic Theme Component Inclusion
|
||||
When writing or modifying Thymeleaf templates for the public frontend, NEVER hardcode paths for common layout components (such as header or footer) to a specific theme (e.g., `themes/umass/header`) or to the default fallback (e.g., `fragments/footer`) unless explicitly building an admin/manage page.
|
||||
|
||||
Instead, ALWAYS use the `activeTheme` variable to dynamically load the active theme's component.
|
||||
|
||||
**Correct Usage:**
|
||||
`<header th:replace="~{themes/__${activeTheme}__/header :: header}"></header>`
|
||||
`<footer th:replace="~{themes/__${activeTheme}__/footer :: footer}"></footer>`
|
||||
|
||||
**Incorrect Usage:**
|
||||
`<div th:replace="~{themes/umass/header}"></div>`
|
||||
`<footer th:replace="~{fragments/footer :: footer}"></footer>`
|
||||
|
||||
Reference in New Issue
Block a user