NUIG Code Only

Use 'NUIG Code Only' to embed web code into your Site Manager-generated page - this is useful if a 3rd party provides something to embed in the page (e.g. twitter follow button).  

Using this content type is easy - just give it a name and then paste in the HTML code you need to add to your page.  Then go to the Save Changes button, click on the little arrow and choose 'Save and approve'.

Accessibility: 64.4% of the world's total population uses the internet. 15% (1 in every 6 or 7) of them have some form of disability.  Do not discriminate against these users - ensure that whatever you paste into the 'NUIG Code Only' content type complies with Level AA accessibility standards.  You can do this easily by first pasting it into the 'Markup' tab in Achecker

What else can it be used for?

Everything the average editor needs, to create University web pages, is already coded into content types.  These hide the complexity of enabling that feature on all browsers, devices, and screen sizes - making it easy for users to add high-quality, cross-browser features. 

The ‘NUIG Code Only’ is what a web developer could use to achieve something, if no content type already existed for that purpose.  Using their expertise in web development (e.g. languages, toolkits, frameworks, cross-browser compatibility, responsive design, etc.), they could create client-side code (i.e. code that runs on the browser after the page is loaded) that enables a particular action or feature.
This is beyond the average editor - but sometimes you are advised to paste some pre-prepared code (created by the University's web team) into an 'NUIG Code Only', to address a particular issue.

Typically an 'NUIG Code Only' contains either JavaScript / JQuery code, CSS style rules, or HTML / PHP / JSON / XML / XSL syntax.
But, occasionally, it will be used to invoke some advanced CMS features that run during publish.  These are called navigation objects - and they are used to build breadcrumbs, mega-menus, sidenavs; force alternate views of content types (e.g. news snippets instead of the full article); or import external data from other websites (e.g. IRIS profiles).

The university makes use of 'NUIG Code Only' for:


This paragraph is normal 'Content'.  However, everything that follows this line is embedded HTML, which was placed in an 'NUIG Code Only' content type:

Any code can be placed in here.
It will be published as-is by Site Manager

This particular embedded content has been deliberately given a background colour and a dashed border to make it stand out from the rest of the content in this example page - and to demonstrate how the 'NUIG Code Only' content type allows you to do things that are beyond the page layout's normal capabilities.
Highlighting content in this way is NOT recommended in published university webpages.

Without this unique styling, the embedded content would look exactly like any other content on the page, as shown below.

This is a paragraph of text (also defined in the 'NUIG Code Only' content type) that has had no special styling applied to it. As you can see, it looks just like any other text on this page.