Skip to content

codeconsole/grails-plugin-sitemesh3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b2f55a1 · Dec 20, 2024
Dec 13, 2024
Dec 13, 2024
Dec 12, 2024
Nov 22, 2024
Jul 27, 2023
Nov 11, 2024
Jul 27, 2023
Sep 17, 2024
Dec 20, 2024
Dec 20, 2024
Sep 15, 2024
Sep 15, 2024
Jul 27, 2023
Nov 12, 2024

Repository files navigation

SiteMesh 3 Grails Plugin

SiteMesh 3 Grails Plugin demonstrating how to use SiteMesh 3 instead of SiteMesh 2

See discussion here

Want to See the Full Power for Sitemesh 3?

Check out using SiteMesh 3 layouts on GSP and JSP pages, error pages, specifying layouts in controllers, and even applying multiple layouts to the same view!

You can see a working example by running this plugin: ./gradlew bootRun

Grails 6 Installation instructions:

Step 1 - Install the plugin

Modify build.gradle to use the plugin

repositories {
    // ...
    maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}

dependencies {
    implementation("org.sitemesh:grails-plugin-sitemesh3:7.0.0-SNAPSHOT")
    // ... existing dependencies
}

oss snapshots is needed until the plugin are officially released.

Step 2 - You are done. Enjoy Bonus features

Your app is now using SiteMesh 3 and is no longer using SiteMesh 2. NO FURTHER CHANGES NEEDED.

Bonus: You can now enjoy multiple layouts on each page!

For instance, let's use /grails-app/views/layouts/googleAnalyticsLayout.gsp and /grails-app/views/layouts/main.gsp:

<html lang="en">
<head>
    <meta name="layout" content="googleAnalyticsLayout, main"/>
    <title>Home</title>
</head>