Adding a Content Box from LibGuide - Edmon Low Library
Design Guide
Maintenance & Upkeep
Adding a Content Box from LibGuide
Step 1: Generate the Embed Code in LibGuides
-
In the configuration settings, check the box that says "Include jQuery Library".
-
The JQuery is only needed for the first widget on the page.
-
-
Copy the generated embed code to your clipboard.
Step 2: Adding the Widget
Option A: Directly into a MODX Resource (Page)
-
Open the target Resource in the MODX Manager.
-
Ensure Rich Text is turned OFF for this resource.
-
Paste your copied embed code directly into the main content field.
Option B: Into a MODX Chunk (For Reusable Layouts)
-
Create a new Chunk.
-
Paste the embed code directly into the Chunk code field.
-
To use it on a page, you will call this chunk using [[$your-chunk-name]].
Step 3: Style the Content Box
To ensure the LibGuides box matches our website's Styling , you need to apply our custom styles.
-
Go to the very last line of the embed code you just pasted (either in your Resource or your Chunk).
-
Hit Enter to create a new line at the bottom, and paste this MODX chunk tag:
[[$libguides-content-css]]
Why the chunk step matters: The [[$libguides-content-css]] chunk overrides standard LibGuides styling so the embedded box natively matches the website styling. Putting it at the end widget code ensures it takes priority in the browser layout.
*The chunks libguides-box-css and libguides-clean-css only should be added once on an page!
Optional Styling (Remove Default Box Layout)
If you want to remove default borders, background colors, and margins from your LibGuides content box widgets, choose one of the options below.
Option A: Individual Content Boxes
-
Add the class="no-box" attribute directly to the specific widget's HTML.
<div id="s-lg-widget-xxxxxxxxxxxx" class="no-box" ></div>
Note: The xxxxxxxxxxxx in the ID will be replaced by the unique numbers generated for your specific widget.
Option B: Apply to All Content Box Widgets on the page
-
Add the
libguides-box-cssandlibguides-clean-csschunks to the widget.[[$libguides-box-css]]
[[$libguides-clean-css]] -
Note: The xxxxxxxxxxxx in the ID will be replaced by the unique numbers generated for your specific widget.