Web Services Blog

Customize your lists

You need to create an ordered or unordered list and you are tired of seeing the same old list characters like the ones below.

  • line one
  • line two
  • line three
  1. line one
  2. line two
  3. line three

How can you customize your lists?

Apply list styles like these:

  • circle
  • square
  1. lower alpha character
  1. upper alpha character
  1. leading-zero
  1. lower roman numeral
  1. upper roman numeral

by doing this:

<ul class=”circle”>
<li>circle</li>
</ul>

<ul class=”square”>
<li>square</li>
</ul>

<ol class=”lower-alpha”>
<li>lower alpha character</li>
</ol>

<ol class=”upper-alpha”>
<li>upper alpha character</li>
</ol>

<ol class=”decimal-leading-zero”>
<li>decimal leading zero</li>
</ol>

<ol class=”lower-roman”>
<li>lower roman numeral</li>
</ol>

<ol class=”upper-roman”>
<li>upper roman numeral</li>
</ol>

Create a reference asset

Suppose you have an asset in Cascade you want to display in the left navigation of more than one site. You can copy the asset over and over again into each of the folders for the site, but you don’t want to duplicate an asset multiple times. What do you do? Create a reference asset! A reference asset is a special asset in Cascade that represents an existing asset in another location. This means a single asset can appear to exist in multiple locations.  The asset will appear in the left navigation as if it had been copied to multiple folder but in actuality, it just links to the original asset.

To create the reference:

  1. Select the page you want to create a Reference for from the asset tree.
  2. Go to the Advanced menu and choose Reference. The Reference window is displayed.
  3. Enter a system name for the reference. The system name should be different from any other asset in the same folder as the reference asset. The display name of the asset being referenced will be retained. You may change it after the reference has been created.
  4. Navigate to the folder where the reference will be displayed. Submit the asset.
  5. The Reference is now created!

Notice the reference asset in the asset tree. Select the reference asset and the referenced page will be displayed.

Build a simple email feedback form

This code will build a simple form requesting Name, Email and Feedback information. The code must be entered into Cascade from the html editor, not from the WYSIWYG editor. Open the html editor by selecting the html button on the WYSIWYG toolbar. Copy the following text in red into the “body” or “content” section of your form page, where you want the form fields to go.

<form action=”http://www.clemson.edu/cgi-bin/formail.cgi” method=”POST”>

<label><strong>Name: </strong>
<input id=”realname” maxlength=”50″ name=”realname” size=”40″ /> </label>
<label><strong>Email:</strong> <input id=”email” name=”email” size=”50″ /> </label> <label><strong>Feedback</strong></label>
<textarea id=”feedback” cols=”45″ rows=”4″ name=”feedback”></textarea>

<!– CONFIGURATION AREA –>

<input name=”subject” type=”hidden” value=”Subject Line of Email” />
<input name=”redirect” type=”hidden” value=”http://www.clemson.edu/xxx” />
<input name=”recipient” type=”hidden” value=”Your Email Address Here” />
<input name=”required” type=”hidden” value=”email,realname,feedback” />

<!– END CONFIGURATION AREA –>

<input name=”submit” type=”submit” />

</form>

Once the form code is copied into the html editor, edit the values located in the “Configuration Area” to customize the form results you will receive via email when the form is completed and submitted.

The value=”Subject Line of Email” refers to the text that will be displayed in the Subject: field in the email messages you receive when the form is submitted. Edit this code to customize the subject line.

The value=”http://www.clemson.edu/xxx” refers to a web page, such as a thank you page, that will load automatically when the form page is submitted. Edit this code and replace the xxx with the system name of the thank you page.

The value=”Your Email Address Here” refers to the email address of the person who will receive the form results. Edit this code and replace with a valid email address.

The value=”email,realname,feedback” refers to the fields in the form that must be filled in order to submit. These values must match the values of the field names

For more information about additional optional fields to configure the form, please see the content under the heading “Optional Form Fields:” at http://www.scriptarchive.com/download.cgi?s=formmail&c=txt&f=README

Home page feature – rotate image on refresh script

This is how to add rotating images to the feature area on your home page.

Create a new text file and copy the content in red below into it. Save the file as rotateImageOnRefresh.js and upload it to Cascade. Place it in the same folder as your index page.

<!-- SET THE MAX FEATURE COUNT (Total -1) -->
var maxFeatureNo = 4  <!-- 5 total - 1 = 4 -->

var featureNo
var myFeature = new Array()
<!-- CHANGE img src= to the file path of your image --!>
<!-- MAKE SURE YOU HAVE ONE FOR EACH FEATURE IMAGE -->
myFeature[0] = '<img src="images/features/01.jpg" width="688" alt="Put your ALT tag here" border="0">'

myFeature[1] = '<img src="images/features/02.jpg" width="688" alt="Put your ALT tag here" border="0">'

myFeature[2] = '<img src="images/features/03.jpg" width="688" alt="Put your ALT tag here" border="0">'

myFeature[3] = '<img src="images/features/04.jpg" width="688" alt="Put your ALT tag here" border="0">'

myFeature[4] = '<img src="images/features/05.jpg" width="688" alt="Put your ALT tag here" border="0">'

<!-- DONT TOUCH --> featureNo = Math.round(Math.random() * maxFeatureNo) document.write(myFeature[featureNo])

<!-- IF NOTHING DISPLAYS ON THE PAGE THEN SOMETHING IS WRONG -->

Edit your index page. Copy the following content in red where you want your images to be displayed.

<script src="pathToFile/rotateImageOnRefresh.js"></script>

Submit your index page. Publish the rotateImageOnRefresh.js file, your index page and all the images that will rotate when the page is refreshed.

Create a link to an email address (mailto: link)

The WYSIWYG editor does not have a built-in mailto: option but you can still easily create a link to an email address.

  1. Highlight what you want to become a link (preferably the person’s name or their full e-mail address spelled out).
  2. Choose the Insert/Edit link button from the WYSIWYG toolbar.
  3. Choose the External Link tab.
  4. In the Link field enter mailto: followed by the e-mail address (mailto:web_services-l@clemson.edu).
  5. Add a title to describe the link (Email Web Services).
  6. Choose the Insert button.
  7. Choose Submit.

Insert and upload at the same time

You can upload a file into Cascade as you are inserting it into your page. (Be sure the appropriate extension is part of the file name: pdf, .jpg or .doc.)

Insert an image:

  1. Click inside the content region where the image will be placed. For example, if you would like the image to be in line with the top of the text, you will place your cursor before the first sentence.
  2. Choose the “Insert/Edit Image” icon  from the WYSIWYG editor.
  3. Click the file chooser icon.
  4. Select the folder where the image will be saved (such as the image folder). The Upload option is now available from the Browse menu in the upper left corner.
  5. Click Upload.
  6. Select the image to be uploaded and choose Open.
  7. The Select File box in Cascade will contain the path of the file you have chosen to upload.
  8. Choose the Upload button.
  9. Choose the Confirm button and confirm that the file has been uploaded to Cascade.

Inserting a link:

  1. Select the text or image to link from
  2. Choose the “Insert/Edit link” icon  from the WYSIWYG editor.
  3. Click the page chooser icon.
  4. Select the folder where the file will be saved (such as the documents folder). The Upload option is now available from the Browse menu in the upper left corner.
  5. Click Upload.
  6. Select the file to be uploaded and choose Open.
  7. The Select File box in Cascade will contain the path of the file you have chosen to upload.
  8. Choose the Upload button.
  9. Choose the Confirm button and confirm that the file has been uploaded to Cascade.

Align text around an image

Images can be placed either before or after your text has been added.

  1. Click inside the content region where the image will be placed. For example, if you would like the image to be in line with the top of the text, you will place your cursor before the first sentence.
  2. Choose the “Insert/Edit Image” icon  from the WYSIWYG editor.
  3. Choose the internal tab to insert an image from Cascade. You can also upload images to Cascade during the insert image process.
  4. Select the file icon to browse to the image folder.
  5. Select the image  and choose confirm.
  6. Add the alternate text for the image including “Clemson University, Clemson, SC” at the end of each entry.
  7. Do not enter anything in the width/height boxes since your image should already be sized correctly.
  8. Choose insert.

The image alignment styles are available from the WYSIWYG editor’s Styles drop down menu.

  1. Select the image you have placed on your page.
  2. Select the Styles drop down menu from they WYSIWYG editor’s top row.
  3. Select the left or right style.
  4. Submit the page.

The left and right styles automatically add the correct amount of vertical and horizontal spacing around the image so you don’t have to do anything extra to add that. The left and right styles do not however, add a border around the image. To add a border around your image you must edit the html.

  1. Take your page into edit mode
  2. Select the html button from the WYSIWYG toolbar to bring up the html editor
  3. Find the paragraph tag in front of the image tag – it should look like this: <p><img
  4. Edit the paragraph tag and insert the border information – it should look like this: <p><img
  5. Select the Update button to update the html
  6. Submit the page

 

Change page type

Page assets are associated with a set of configurations for each page type. The configuration set for the left navigation page type is different from the configuration set for the full page. To change the page type, the configuration set must be changed. Not all users in Cascade have a role that will allow them to change the configuration set of a page asset.

Contributors and Publishers:
Content managers who are in the Contributor or Publisher role do not have access to change the configuration set for the page assets they are building.

  • Copy the content from the current pageCreate a new page asset for the page type you desire
  • Paste the copied text into the content region of the new page asset
  • Enter the Display Name and Title
  • Enter a System Name
  • Submit
  • Delete the page asset you no longer need

Your site manager and the Office of Web Services can change the configuration set for you.

Managers:

  • Choose Edit and select the System tab
  • Choose the Configuration Set link
  • Navigate to the configuration set you are changing to and select it
  • Confirm that you have chosen the correct configuration set
  • Submit

Create a link to a specific area on a Web page

Anchor links are used to navigate from a specific area to another specific area within a single Web page, or from a specific area on one Web page to a specific area on a different Web page. They are a good way to provide easy navigation through pages that have multiple sections of content.

  1. To create an anchor, click in the specific area the link will point to. Choose the “anchor” button  in the WYSIWYG editor.
  2. In the pop-up window, name the anchor. The anchor becomes part of the URL so, like the System Name, it should be unique and Web friendly.
  3. Choose “insert” to set the anchor. Create as many anchors as you need.
  4. Make sure the page you are linking to has been submitted in Cascade.
  5. Select the text that will become the link.
  6. Choose the Insert/Edit link button on the WYSIWYG toolbar.
  7. Choose the Internal tab and select the page from Cascade that has the anchors in it. Type in the name of the anchor in the anchor field.
  8. Submit your page and publish.

Adjust spacing between paragraphs, sentences and headers

Paragraphs are double-spaced by default because that makes the text easier to read on a computer screen). Hitting the enter/return key between paragraphs will add a double-space, creating a new paragraph, but holding down the shift key when hitting enter/return will add a single space, creating a line break. Line breaks are often used to separate sentences that aren’t long enough to wrap, but are not ordered or unordered lists.

Ordered and unordered list items are single spaced by default so hitting the enter/return key after each list item is the correct way to format the list, as shown in this example.

  • orange
  • banana
  • lemon
  • strawberry

Hitting the shift key and the enter/return key in the list will indent the second line, but not give it a bullet.

  • orange
    banana
  • lemon
    strawberry

Headers are used to draw special attention to specific text by increasing or decreasing the default font size and, depending on the header style, make the text bold or italic. Headers are by default followed by a double space regardless of what type of text comes next. If you hold down the shift key and hit the enter/return key after a header, you will actually be adding a paragraph break AND a line break. You can however apply a style class named “title” to the header that will remove the paragraph break and add a line break. Applying the style does require a little editing of the html. Look for the header tags – in the example below the tags are <h4>and</h4>, and add to the opening tag – class=”title”.

Example:

<h4 class=”title>With the “title” class</h4>
Aenean ultricies Donec fames turpis eu tortor mi egestas. Mauris eleifend tristique et netus eget, Pellentesque senectus quam, tempor amet malesuada amet, leo. ante. quam Vestibulum habitant et morbi feugiat sit semper. ac sit est. vitae, ultricies placerat egestas vitae libero

Without the “title” class

Aenean ultricies Donec fames turpis eu tortor mi egestas. Mauris eleifend tristique et netus eget, Pellentesque senectus quam, tempor amet malesuada amet, leo. ante. quam Vestibulum habitant et morbi feugiat sit semper. ac sit est. vitae, ultricies placerat egestas vitae libero