Instructions for adding Class Notes in MODX
- Navigate to the Class Notes directory (ID12416)
- Right click on an existing alumni, choose Duplicate from the dropdown. Add a new name (last name, comma, first name. Example: smith, john). Check Redirect to duplicate. Select Make all unpublished. Hit Save.
- On the Document tab, change the name in the Long Title field with first name than last name (Example: John Smith).
- Go to Template Variables tab, upload the alumni photo to Homepage Feature Image field. Make sure the image is 400px by 250px. If no photo is provided, use the default image:
- Enter text in the Spotlight Summary field.
- Scroll down to the Class Year field, add the year in digits. Example: 1991
- Return to the Document tab, activate the Published button, enter the Publish On date, then hit the Save button.
The hero banners are randomly loaded each time a visitor land on our homepage. Here are the steps to publish or unpublished them:
- Create two banners: desktop (1600px by 800px) & mobile (400px by 600px)
- Log into MODX then navigate to the Home Banners (ID#12335) directory
- Pick an existing resource and duplicate it. Paste in the text that corresponds to the banner (this text will also be use for the
alt tag). Check the Mark All Unpublished radio button, then hit Save
- Go to the new duplicated resource, make sure the Title and Long Title are the same
- Go to the Template Variable tab, upload the desktop version to Homepage Feature Image field and the mobile version to Spotlight/Feature Image (see screenshot)
- Scroll down to URL for In the News and enter a URL. A URL is required. If there’s no URL, the link will be defaulted to the homepage
- Go back to the Document tab, activate the Published radio button and then hit Save. To remove the banner from the line up, deactivate the Published and then hit Save or delete the resource.
In case of an emergency, we have implemented an alert message that would appear on every page at law.gmu.edu. Here’s an example:
To Activate the Emergency Alert Message
- Log into MODX Manager, navigate to the Emergency container (id#12996), and open up the Emergency Message resource (id#12996).
- Go to the Template Variables tab, select the Uncategorized tab on the left. Write an emergency alert message in the Content2010 box, which is the first box. Return to the Document tab, click on the Published button, then hit the Save button.
- Search for the 2012_template_top chunk, scroll down to this line (around line 29):
[[-getResources? &parents=`12995` &depth=`1` &tpl=`emergency_alert` &tvPrefix=`` &includeTVs=`1` &limit=`1` ]]
Remove the first hyphen (-) to activate GetResources. (Because we hardly used this emergency alert message, activating this snippet might affect the site performance when we are not using it)
To Deactivate the Emergency Alert Message
To deactivate the Emergency Alert Message, simply unpublished the Emergency Message resource (id#12996). Comment out the GetResource snippet (by adding the hyphen back into the 2012_template_top chunk) is not required, but a good practice to prevent an extra dynamic call.
After upgrading The Events Calendar plugin to 22.214.171.124 and migrating to the new event data storage system, the admin in The Events Calendar displays duplicating titles.
Since we are using CAS Authentication plugin to add an extra security layer to our MODX Manager, we need a way to disable the plugin in case something goes wrong and we don’t want to get locked out of our own site. Here are the steps to disable plugins outside the Manager:
- Log into the cloud dashboard and temporarily add phpMyAdmin to the cloud
- Log into phpMyAdmin, browse the
modx_site_plugins table for the CAS plugin, double-click on the
disable column to change the value from 0 to 1 to disable the plugin
- Manually clear the cache by logging into sFTP and delete everything in the
- Log back into the cloud dashboard to turn off phpMyAdmin
Referenced in steps below: Course Schedule Instructions.
- Save a copy of the original Excel file to come back to later for the Notes sections.
- Open up the original Excel file, merge multiple faculty into one row, then delete all the empty rows.
- Make sure columns are identical to the column names in script (do not include Room Number or First Name of Instructor). Delete hidden columns (Room Number, First Name of Instructor, etc.). Make sure column names match these: CRN#, CRS#, SEC, Course Title, Instructor, Cr Hr, Days, Time, Room, Exam Date, Exam Time
- Make sure footnotes are standardized, e.g., (E) and not (E ) with a space (Update: script has been updated to account for this)
- Remove all rows that are not the table header (first row) or the courses.
- Save DAY and EVE sheets each as two new csvs by highlighting all cells with data and copying/pasting them into a new file/save as csv (to avoid extra blank columns that may be present by saving entire sheet). Do not open them (especially in Excel) once they are saved, because this may change how the Section numbers are interpreted and may cause 001 to be 1, and so forth.
- The R code below covers Steps 2 – 6 in Course Schedule Instructions to create the HTML table.
- In R code, update the “dayNotes” variable to match the number of Day Notes. Update the file paths/names for input files and output file.
- Paste output into an HTML editor. Copy and paste notes from the copy of the original Excel file to the bottom of the HTML page.
- Once everything looks good, paste into MODX.
A request to pull the following information from the full-time faculty directory:
- Last Name
- First Name
- Degrees and Schools
- SSRN link
- Subjects taught
- Area(s) of Expertise
- CV (PDF link if they have one posted)
- Bio (link to profile page)
Create a chunk (
<td>[[+degree6:isnot=``:then=`[[+degree6:ReplaceDegrees]]`]][[+alma_mater6:isnot=``:then=`, [[+alma_mater6]]; `]][[+degree5:isnot=``:then=`[[+degree5:ReplaceDegrees]]`]][[+alma_mater5:isnot=``:then=`, [[+alma_mater5]]; `]][[+degree4:isnot=``:then=`[[+degree4:ReplaceDegrees]]`]][[+alma_mater4:isnot=``:then=`, [[+alma_mater4]]; `]][[+degree3:isnot=``:then=`[[+degree3:ReplaceDegrees]]`]][[+alma_mater3:isnot=``:then=`, [[+alma_mater3]]; `]][[+degree2:isnot=``:then=`[[+degree2:ReplaceDegrees]]`]][[+alma_mater2:isnot=``:then=`, [[+alma_mater2]]; `]][[+degree1:ReplaceDegrees]][[+alma_mater1:isnot=``:then=`, [[+alma_mater1]]`]]</td>
The square brackets (
[[+lname]]) correspond with the form field inside MODX. To see how the fields were created, take a look at the
After creating the
ditto.faculty_list_2021_ABA chunk, put it inside the script below:
[[getResources? &showHidden=`1` &includeTVs=`1` &tvPrefix=`` &limit=`0` &sortbyTV=`lname` &sortdirTV=`ASC` &parents=`5842` &depth=`1` &tpl=`ditto.faculty_list_2021_ABA` &sortBy=`lname` &sortDir=`ASC` &display=`all` &filter=`hide_all,1,2`]]
Past the script above on any page inside MODX to populate the table. The tag
&parents=`5842` refers to the ID number of the full-time faculty directory.
Steps for adding a new Gravity Form in WordPress:
- In WordPress nav bar, choose Forms (with Gravity Forms logo), then choose New Form
- Add Fields and update Field Settings (e.g., make a field required). Save Form and Preview it (top right)
- At the top of the Form Editor are Settings and Entries. Completed form submissions are located in Entries. In Settings are Form Settings, Confirmations, and Notifications:
- Form Settings may be adjusted as needed
- Confirmations are what the user sees after submitting the form. Defaults to Text and may be updated to Text, Page, or Redirect (use Redirect to send user to an external page after submitting the form). Conditional logic is also possible
- Notifications are sent to admin by default when a form has been submitted (this includes tests in Preview). In Admin Notification, update ‘Send to Email’ field to update email address that will receive a notification when a form is submitted. Update other fields if needed. If needed, Configure Routing to send notifications conditionally based on form Field responses (be sure to update the ‘Any/All’ dropdown to reflect the desired logic)
- Create a Page for the form by clicking Pages, then Add New in left nav bar
- In the new page, add a title, which will autogenerate a permalink (editable)
- In the new page, add a shortcode to the Paragraph section to display the Gravity Form on the page. Copy shortcode from an existing page, replacing “ID” with the ID of the new Gravity Form (found in Forms area; see #1 above)
- Preview, then Publish page when ready. Share form via permalink (see #5 above)
Instructions for adding an event to our Calendar of Events. Please note that we only publish events that are open to law students, faculty, and staff. Our target audience for the public calendar is law students. Please do not list private or “by invitation only” events on here.
- Login into the Calendar of Events website. If you access the website outside of the George Mason network, you would need to log into our VPN first.
- From the Event section on the left-hand menu or the drop-down menu at the top, choose Add Event.
- Add Title, Description, Time & Date, Location (check to see if the location existed), Organizers (check to see if the organizer existed), and Event URL.
- Ignore Event Cost, Excerpt, Custom Field, and Slugs.
- For Discussion, uncheck Allow comments.
- For Event Categories, check all that are appropriate or add new category if necessary.
- For Event Options, leave it blank unless you want to hide it from listing.
- Ignore Custom header.
- For Featured image, please crop your image to 1200px x 675px for consistency.
- Hit Publish when you are finished.