| User Guide | Entire wiki contents | Recent Changes | |
| AddAPullquoteToAPagex |
| Front Page > | How Do I > | Add A Pullquote To A Page |
Contents
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:
Please see the Pullquote Style Guide for content guidelines and other information about the standards set for including pullquotes in the Portfolio.
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
_.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, _, )">
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.
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.
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.
quote function.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.
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 <br>, please see the Pullquote Style Guide.
You are finished!This is what our finished pullquote would look like.
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' )">
For additional features of the quote function, see the Technical Guide:Add A Pullquote To A Page .
Here are the things to watch out for when using this function. These are the most common mistakes made.
_.None and _ ( underscore ) are in the function parameter list.quote element inside of the function call. This would be just before the word quote to just after the ending ).\ ).Here is an example:
content='The text was from Sally\'s bulletin board'