How to do some of the unique things
The website has the capability to display dismissible alerts such as when transmitter maintenance will take the station off the air, or a special fundraising message, etc.
Several of these alerts currently exist in the CMS, but the display of these alerts are usually disabled by commenting out their code. To enable display, remove the "comment out" elements.
Here's an example alert on the WILL Home page:
To create or update these alerts, two things must be done./p>
First, write or update the copy that will be displayed. This is done in Add-ons -> Modules -> Low Variables -> Editable content. This is also where we disable display of the alert by commenting out the code, or enabling display by removing the html "comment out" elements.
<div class="alert alert-warning alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
<strong>Notice:</strong>
On Wednesday evening July 15, WILL is performing maintenance at
our Monticello transmitter site. From the hours of 7 pm Wednesday to 6 am Thursday morning, our FM
90.9 broadcast will be off the air while tower climbers replace parts of our TV transmission
line. During the outage of FM 90.9, our FM program service will continue from our 101.1 translator
in Urbana and online at our website. We apologize for the inconvenience during this necessary
maintenance work.
</div>
Second you need to tell ExpressionEngine where to display the alert. To add the alert, go to Template Manager -> Snippets. To add to the main home page, go to the sn_homepage. To add the alert to other home pages, you need to do similar things to sn_homepage_agriculture, sn_homepage_education, sn_homepage_fm, etc.
The lv_alert_pledge and lv_alert_problem snippets are already added to the main home page, placed just above the slideshow at the top. That's probably the best place for these and other alerts, but stacking them would be visually problematic.
In this case we're adding the Pledge Alert:
{exp:low_variables:single var="lv_alert_pledge"}
Replace "lv_alert_pledge" with the name of whatever alert you need to display.
Remember to comment out the lv_(whatever_alert) snippet when the need for it is done and you don't want the alert to display!
Sometimes we need a page for displaying content tagged with a specific keyword/tag. This is different from the unique pages created automatically for each tag in the CMS. This section will explain why we sometimes need something different, and how to create a special tag-based collection.
Let's say we have special project about the Supplemental Nutrition Assistance Program (SNAP). We're going to produce News stories, do interviews on The 21st, and produce some video segments and whatever else. We want a special project page for the SNAP series and in addition to the content, that page should have its own SNAP series branding and description.
Let's say for example like this SNAP Series page.
This is different from a regular tag page in several ways:
tags/news displays only News channel content based on its tag, like https://will.illinois.edu/tags/news/affordable-care-act/. In this case "affordable-care-act" in the 3rd url segment is the url-safe representation of the tag "Affordable Care Act". And the template tags/news is set to only display News content with that or any other tag.But with a special project we need more than a regular tag page. The project page needs a description at the top, and it can display posts from any channels you specify when setting it up. Here's how to do that.
Here are the ingredients:
You can copy the page template from another tag-based project (like news/snapseries), but here's the basic idea:
{sn_articles_by_tag} does the rest.We can create an arbitrary custom url, using the site domain of will.illinois.edu, and redirect it to any other url.
Let's say we need a human-readable link to an Allegiance pledge form. So we want a url of e.g. https://will.illinois.edu/ThinkAgain and have it redirect to the Allegiance form (which has a long and complicated url).
What to do? Create a url redirect!
/ThinkAgain. As always with the Pages URL, the site domain is included automatically before the first backslash.pages/redirectThe pages/redirect template consists of one simple code block:
Since the template doesn't need to render any html, it doesn't need any markup. Just the meta tag that redirects to the link_url in the entry.
We can display podcasts as html on the site. The 21st, Environmental Almanac, and Legal Issues in the News are examples.
First you have to write and update the copy that will be displayed. This is done in Add-ons -> Modules -> Low Variables -> Editable content in the lv_alert_problem local variable.
Embed code:
<div class="pb-embed" data-feed="http://will.illinois.edu/21stshow/rss" data-limit="XXXX"> </div>
<script src="https://will.illinois.edu/WILLPodcastEmbed.js"></script>
Replace the RSS URL with the URL of the podcast you want to embed on another site. Replace XXXX with the number of items from the feed that you want to display.