George Mason University Antonin Scalia Law School

Instructions for Restoring Course Schedules in MODX

  1. Duplicate the entire course schedule directory. For example: 2016 Course Schedule and rename it to 2015 Course Schedule.
  2. Open up the directory you just copied, select Duplicate of 2016 Fall. Rename Title and Long Title to 2015 Fall. Rename Source Alias to 2015_fall.
  3. Open up the static HTML page.
  4. Search ../../.. and replace with nothing (blank).
  5. Search for .html and replace with nothing (blank).
  6. Search for ../../courses/ and replace with /academics/courses/
  7. Search <img class="icon" src="assets/images/icons/pdf.png" alt="PDF file" width="16" height="16" /> and replace with nothing (blank).
  8. Search <br /><img src="/assets/images/icons/weather_sun.png" alt="" width="16" height="16" /> and replace with nothing (blank).
  9. Search <br /><img src="/assets/images/icons/moon.png" alt="" width="16" height="16" /> and replace with nothing (blank).
  10. Replace <img src="/assets/images/icons/pencil.png" alt="" width="16" height="16" /> and replace with nothing (blank).
  11. Copy the page starting from the list (ul) all the way down to the end of the table (<!-- END HERE-->).
  12. Add this class <div class="table-wrap"> before the opening table element and </div> after the closing table element to make the page responsive.

For anchor links on pages prior to modx, replace:
2000fall.html#
with:
[[~[[*id]]]]#

Add this to the top:

<ul>
<li><a href="[[~[[*id]]]]#schedule">Schedule</a></li>
<li><a href="[[~[[*id]]]]#assignments">Assignments</a></li>
<li><a href="[[~2481]]">Archives</a></li>
</ul>

Remove the following entirely:

<img src="https://www.law.gmu.edu/images/new.gif" alt="" width="25" height="12" border="0">

<img src="assets/images/icons/pdf.gif" alt="PDF Document" width="16" height="16" />

<span style="font-family: Arial,Helvetica,sans-serif;">

<span>

</span>

_2012summer001.html

Replace:

../../courses/

with

/academics/courses/

How to Connect Google Sheets to Contact Forms

After creating your form, click on the Google Sheets tab:

 

 

 

On your Google Drive account, create a new Google Sheet. Save it as something memorable.

You will need to grab the name of the sheet, the Google Sheet ID (directly from the URL of the sheet), and the Tab name (default is Sheet1).

Paste it in the fields below:

 

 

 

 

Once you have that, map the column names to the form field names you’ve chosen for your form. Pay close attention to the order of the field names. As you go down the form grabbing names, you need to paste them into the first row, moving from column to column, left to right.

Examples of the fieldnames below:

 

 

 

 

 

Test your form first to make sure the data is being pulled into your Google Sheet before releasing the form.

Creating “In the News” Content

“In the News” content can be found under Resource ID 11086 and should be contained within the year of posting.

The simplest way to create an “In the News” item is to duplicate an existing resource from an existing faculty. Once you make a duplication, uncheck the published radio button to prevent the resource from showing up in the public

In fields 1 and 2, enter the headline of the content. For consistency, do not preface the name with “Professor”.

In field 3, enter a readable url that matches with the title of the content.

On the Template Variables tab, scroll down to “URL for in the News”. Enter the link to the article, and be sure to include the Source in the “Source for in the News” field below:

Submitting A New Event on EMS

The Event Management System allows events to be added to the Master calendar as well as the Special Events calendar that will display events on the EMS RSS Feed.

Note: You must have administrator privileges in order to make the following changes.

  1. Check the featured event box if you want the event and corresponding image to be seen on the master calendar carousel. This is not required.
  2. Add the Event Title
  3. Add the Event Link. This is usually the registration link, or the link to the event found on the Center’s website
  4. Copy and paste the Description using the HTML Editor.

  1. The contact name and email will be filled in automatically. Check the hide box if you want your contact information hidden from being displaying
  2. In the Calendar drop down, you may select multiple entries. If you only want the event to appear on the homepage RSS feed, select Special Events
  3. Enter the Center or School name under department
  4. Enter the Name of the location and link. The link field is not required.

  1. Specify the time and whether or not the event lasts all day.
  2. Include the Event Image for every event.

MODx comments

MODx comments will not appear when viewing the source code of a page. This is especially useful when trying to keep old banners on the homepage while having it out of sight.

To use MODx comments, use the following syntax:

[[- ]]

Kiosk Database List

The Kiosk page is handled by a MODx Ditto. Each entry can be found within the “Find Books, Articles, and Databases” bucket inside the MODx Tree.

To edit the description of an individual entry, navigate to the Template Variables tab, click on “Library” and edit the Description field. Make sure not to include any HTML code inside this field.

Course Schedule Conversion for MODX

This tutorial walks through the steps to convert course schedule from Excel file into MODX.

  1. Open up the original Excel file (provided by Deborah), merge multiple faculty into one row, then delete all the empty rows.
  2. Open up the Course Schedule Sample Excel file
  3. Copy and paste each column such as Course Title, Credit, and Course Number into the sample Excel file. Do it for both Day and Evening courses.
  4. Once everything is in place, copy all (except for row 1) from the Excel file to an HTML editor:

    <div class="table-wrap">
    <table id="course-schedule" class="sortable" border="1" cellspacing="0">
    <tbody>
    <tr>
    <th>Sched.</th>
    <th>Course Name</th>
    <th>Num. (Sec.) CRN</th>
    <th>Instructor(s)</th>
    <th class="unsortable">Days, Time</th>
    <th>Final Exam</th>
    <th class="unsortable">Syllabus</th>
    </tr>
    <!--SCHEDULE STARTS HERE-->
    <!--Paste the table from Excel into here-->
    <!--SCHEDULE ENDS HERE-->
    </tbody>
    </table>
    </div><!--end table-wrap-->

  5. Save as an HTML file and view it in the browser. Clean up all the extra spaces using Search & Replace. For examples: ( 3 cr) to (3cr) and ( 001 ) to (001)
  6. Next, perform Search & Replace for notes items: //, (W), (E), +, and (N.1) to (N.9)


    <a href="[[~[[*id]]]]#permission" title="With witten permission of instructor only.">//</a>

    <a href="[[~[[*id]]]]#writing" title="This course has been designated as a writing course.">(W)</a>

    <a href="[[~[[*id]]]]#experimental" title="This course has been designated as an experiential course.">(E)</a>

    <a href="[[~[[*id]]]]#prerequisites" title="This course has prerequisites.">+</a>

    <a href="[[~[[*id]]]]#n1" title="See Note 1">(N.1)</a>

    Note that (N.1) to (N.9) are different for Day than Evening. For Evening change the anchor ID from #n1 to #n1-eve.

  7. Copy and paste notes from the original Excel file to the bottom of the HTML page. Reformat the notes to include all the anchor links.
  8. Once everything looks good, paste into MODX

    Change text case

    This step is not required, but here’s are tips for change the case of text in Excel.

Setting up an RSS Feed Parser in MODX

MODX uses an add-on called getFeed to parse RSS content.

In order to use it, place this code on your page template (example uses the Faculty News Feed):


[[!getFeed?
&url=`https://sls.gmu.edu/faculty-news/feed/`
&tpl=`RSSFeedParser`
&limit=`1`
]]

The code pulls the RSSFeedParser, a custom chunk we made that pulls the most recent article title and link.

Titles are pulled using:

[[+title]]

Links are pulled using:

[[+link]]

Here is a list of other data fields that may be pulled from the RSS Feed, if available:

  • title – The title of the post.
  • link – A direct link to the post.
  • description – The description of the post.
  • pubdate – The date the post was published.
  • guid – The GUID of the post.
  • author – The name of the author of the post.
  • category – Any tags or category associations the post has.
  • summary – A short summary of the post.
  • date_timestamp – The timestamp of the post.

Like most MODx variables, wrap the data fields with double square brackets, but be sure to use the + sign prefix rather than the * symbol.

Full-Time Faculty Table

The Full Time Faculty Table implements one ditto that calls two separate chunks.

The chunks are:

ditto.people_finder.odd.tr.2018

and

ditto.people_finder.even.tr.2018

The structure of both dittos are the same, with only the row background color being different using the existing even and odd classes within the main style sheet.

When calling the ditto, filter the results using:

&parents=`5842,1794`

This sorts the list based on Faculty Type.

When adding fields use the + sign instead of the usual *, so to add the professor’s title, it would look like this:

[[+title_main]]

To integrate a link, use this format:

<a href="mailto:[[+email]]"">[[+email]] </a>

Main Site Top Navigation Bar

Assigning new pages to different sections of the site are done within the resource itself under Template Variables.

However, adding sections to the Top Navigation Bar requires manually editing a Chunks within MODX.

To add a new Admissions Program to the Admissions section, for example, Navigate to Elements, select Chunks, then Navigation, and select the nav_admissions chunk to manually add the page. Be sure to use Resource IDs in place of the URL.