In the summer of 2014 we introduced a number of new tags to the CMS that allow for more advanced page layouts. There are two noteworthy caveats:
- Many of these tags are sensitive to the underlying html they are intermixed with. You'll need to be comfortable working in the HTML View to use them effectively.
- These tags are not universally across all SERC-hosted sites. Older sites may not yet be retrofitted to take advantage of them. In general consult with your web support person before diving in too deep. In most cases they can work with you to put in the desired advanced tags.
A number of the new tags just provide a new way to make a link with more visual impact. Linkbars and imageblocks both provide a way to combine an image and some text into a single link:
[linkbar 123 left 'Text in the linkbar' http://itpointstohere.com efefef]
The linkbar tag provides a page-wide colored bar with an image (the id provide in the '123' spot) along the left edge and text (in single quotes) filling the rest. The background color can optionally be changed from the default by providing a 6 digit hexidecimal representation of the RGB color at the end of the tag. To work most effectively at a wide variety of screen sizes the image you provide should be at least twice as wide as it is tall and should work visually even if the right side of the image is cropped off.
[imageblock 123 bottom medium 'Text in the linkbar' http://itpointstohere.com efefef]
The imageblock tag has a similar syntax and behavior. It presents a rectangular block combining the image and text; all acting as a single link. The 'bottom' option is appropriate if you have very little text: the text is layed over the top of the bottom of the image. Changing 'bottom' to 'tall' will make a taller block where more room is provided for the text and the image sits entirely above the text. Each of these options is available in a small, medium and large variant.
Note for each of these tags it's possible to insert other formatting (headings, bold) within the text. But the actual tags must fall within the single quotes–something that is best achieved in HTML View. Of course, since the entire bar or block acts as a link, one can't insert other links within the text.
The divclass Tag
A number of the new features rely on using variants of a single new tag: the divclass tag:
This tag, with a specific behavior inside the single quotes, is put at the start of a section of the page to invoke that behavior in that section of the page. The standard [end] tag must be placed at the end of the section. In most cases it's possible to nest multiple divclass tags (make sure you have a matching number of 'end' tags) and also in some cases to specify more than one behavior within the single quotes of a single divclass tag. On a complicated page you may end up with a confusing collection of [end] tags. You can label them in any way you like (e.g. with the same label as the matching divclass) in single quotes at the end of the tag: [end 'mylabel']. This doesn't change the behavior of the end tag, but may help you keep track of which one completes which divclass tag.
Flowing Text Across Multiple Columns
Sometimes you have a long vertical list or run of text that would make better use of the page if it were to flow horizontally into multiple columns. The [divclass 'twocolumn'] behavior will cause the text to flow evenly (responding to changes in page width) across two columns. Note that there is no way to control the exact column breaking behavior (e.g. to make sure a heading isn't separated from its associated text) so this tag isn't useful for larger sections of a page with lots of internal structure. It's best for short lists. There is also a threecolumn variant who's behavior is what you might expect.
Multiple Columns with Pre-defined Content and Equal Height
In some situations, like a website front page, it may be advantageous to split your content into several columns. The following tags will allow you to do in a way that creates columns of equal height (leaving empty space at the bottom of columns to match the height of the tallest column). They all involved a series of nested divclass tags intermingled with the content for the column:
[divclass 'twocoleven-bg2'][divclass 'twocoleven-bg1']
Content of first column
Content of second column
This particular variant creates two columns of equal width. It starts with two divclasses that define the background for the columns (note the reverse order numbering). Then each individual column content is wrapped in a divclass–both a starting tag and an ending tag. It closes with two ending tags that complete the pair of bg divclasses at the beginning. There are several variants available:
- twocolgm used in place of 'twocoleven' in the example above results in the first column being wider than the second (with widths determined by the golden mean).
- .threecoleven can be used to get a three column layout. The section must start with three bg tags (bg3, bg2, bg1) and close those with 3 end tags at the end.
- fourcoleven gives you four columns with the same need to have a matching number of background columns started and ended.
Making Space for Your Content
If you find your content running up against edge and needing more room to breath these tags can be helpful. They'll be especially useful on front pages:
This creates a fixed height block 200 pixels high. This is useful for a so-called 'hero' block at the top of a front page which might include context boxes, links bars and such. Because it's a fixed height you need to know exactly how tall your content will be (across a full-range of screen widths) for it to be useful. hero300 and hero400 are also available if you need more room.
This will put some extra white space between the content within and any surrounding area of the page. This particular one sets aside 2% of the available space as whitespace. More space is available by changing the trailing '2' to 3,6 or 10.
On a Carousel
The [carousel] tag creates a 'rotatable' view of the elements placed within it. Normally these would be a set of similarly sized divclasses, imageblocks or the like. It must be closed with an [end] tag. The addition of the flag 'auto' will cause the carousel to automatically switch contents every few seconds: [carousel auto]. The carousel can also be set to start on a random content element with the 'random' flag (which should be after the auto flag if used: [carousel random]
The imagebanner is a feature designed for hero blocks on front pages. It spreads a large image across the background of a section of a page inside (over) which you can add whatever content is appropriate. It's intended to stretch the full width of the page and in most cases an image 4 times wider than tall is used. If the image doesn't entirely cover the width of the page it will automatically be faded into a background color on either the right or left edge. The banner can either be set to a height that matches the height of the underlying image (using the 'ownheight' option as below), or be forced to fit to the height of the containing block (e.g. one of the hero divclasses above) using the 'containerheight' alternative. The tag below specifies the image id and the side and hex color of the background to fade to. An identical tag with 'end' instead of 'start' must be used to close off the imagebanner.
[imagebanner 40861 right 4d6e8a ownheight start]