User Guide Entire wiki contents   |   Recent Changes  
AddAPullquoteToAPagex

Contents






The quote Function

The quote function is a small program which gives you the ability to easily include a pullquote or text reference in your document. Pullquotes are used for several reasons:

  1. Make the document more interesting visually
  2. Break up long stretches of text
  3. Entice a person to read the document
  4. Offset quoted material from the regular body content

Please see the Pullquote Style Guide for content guidelines and other information about the standards set for including pullquotes in the Portfolio.

  1. Easy steps to add a pullquote
    1. Understanding the basic function
    2. Choose the type of quote, personal or passage (quote_type)
    3. Add the quoted text (content)
    4. Attribute the quoted text (attribution)


Step 1: Understanding the basic function

Briefly:
This is the basic function that needs to be included in your content.

It must be typed in exactly as shown:

      <dtml-var "quote( _.None, _ )">

   Other information will need to be added to this structure to get it to work. When you are done "click here to go to **step two**.":#param_type

More Info:
The function must be put in exactly as shown, including the quotes and parenthesis. The text _.None, _ is special information that Zope needs to do it's work and it must be included. Note that this chunk of text is actually two parts separated by a comma. Each part is called an argument or parameter to the quote function.

The following steps will add other arguments which give necessary information about the image so it can be put on the page. As shown below, the format of these arguments is different. They are in a name/value pair form separated by an equals sign. Most of the values will be enclosed by single quotes. See the following example and note the placement of the equals sign, single quotes, and comma:

      arg_name='info1', arg_name2='info2'

   When you are finished there is likely be more than one of these arguments in the argument list. They will need to be separated by commas. The additional arguments will *always be placed after* the arguments that Zope needs and *always* separated by commas. The final 'quote' function might look something like this::

      <dtml-var "quote( _.None, _,  )">

Step 2: Choose the type of quote

Briefly:
Add person or passage using the quote_type parameter.

example:

      <dtml-var "quote( _.None, _, quote_type='person' )">

When you are done click here to go to step three.

More info:

This parameter specifies the quote content ( ie whether it is a a quote from a person or a section of a document ). It can take one of two values, person or passage.

It controls the way in which the quote is drawn. When the quote_type is set to person the quoted material is displayed in a larger point size than that of passage. The difference in size is to compensate for the fact that personal quotes shouldn't be as long as passages.

The parameter quote_type defaults to type person if it's not included parameter list.

Step 3: Add the quoted text

Briefly:
Add the content using the content parameter.

example:

      <dtml-var "quote( _.None, _, quote_type='person', content='Four score and seven years...' )">

When you are done click here to go to step four.

More info:
This is the parameter used to pass the quoted text into the quote function.

Step 4: Add the attribution ( optional )

Briefly:
Add the attribution using the attribution parameter.

see the attribution style guide

example:

      <dtml-var "quote( _.None, _, quote_type='person', content='Four score and seven years...', attribution='Abraham Lincoln,<br> 16th President of the United States' )">

When you are finished click here to see the finished product.

More info:
This parameter is used to attribute the content to the source. For a quote_type of person, this would be the person's name and possibly their title. For a quote_type of passage it would be the name of the document.

example:

      content='All men are created equal', attribution='Declaration of Independance'

The attribution parameter is optional. The padding used for the attribution won't be printed if it's not included.

For information regarding proper attribution layout ( including the use of &lt;br&gt;, please see the Pullquote Style Guide.

You are finished!

This is what our finished pullquote would look like.







Examples

Here are several examples to give you an idea of what a function call would look like.

personal quote:

    <dtml-var "quote( _.None, _, quote_type='person', content='Well, Holy Mackerel!', attribution='John Smith' )">

passage quote:

    <dtml-var "quote( _.None, _, quote_type='passage', content='... a long section from a boring book...', attribution='Not Necessary' )">

Notes

For additional features of the quote function, see the Technical Guide:Add A Pullquote To A Page .

Troubleshooting

Here are the things to watch out for when using this function. These are the most common mistakes made.

  1. Make sure _.None and _ ( underscore ) are in the function parameter list.
  2. Use double quotes to enclose the entire quote element inside of the function call. This would be just before the word quote to just after the ending ).
  3. Use single quotes around other parameters.
  4. Make sure that each parameter is separated by a comma.
  5. If you need to put single quotes in the content or attribution, escape it with a backslash character ( \ ).

    Here is an example:

          content='The text was from Sally\'s bulletin board'
    

  Main Wiki Page   UserOptions   HelpPage   JumpSearch: Edit this page