Home: Support: Reference Guide: Display Tags: <dpStory>

<dpStory>

D E F I N I T I O N:

The story currently being built or queried.

<dpStory
  default="default text"
  style="lower|upper|title|spaced|roman|decimal|identifier|
         noHtml|noHtmlStyle|scriptEncode|uriEncode"
  link="on|off"
  start="#p|#s|#w|#c|begin|end|resume"
  stop="#p|#s|#w|#c|begin|end|resume"
  length="#p|#s|#w|#c|begin|end"
  images="on|all|off|#|# to #|#,#"
  imageStart="#p" (default is 0p)
  imageStop="#p" (default is 3/4 way through story)
  imageAlign="left|right|toggleLeft|toggleRight|center|none"
  imageMacro="macro name"
>


A T T R I B U T E S:

images="on|all|off|#|# to #|#,#"
Tells the story to display images or not. You may simply say on or all to display all of the images, or you may reference a single image, multiple images or a range of images.

<dpStory images="on">
<dpStory images="1, 3">
<dpStory images="2 to 4">
<dpStory images="2 to 4, 6">
<dpStory images="3 to <dpImageCount>">

imageAlign="left|right|toggleLeft|toggleRight|center|none"
Defines how you want your images aligned within the story.

right - all images align to the right.
left - all images align to the left
toggleLeft - images toggle left to right, back and forth
toggleRight - images toggle right to left, back and forth
center - centers image and follows it with a <p>
none

imageStart="#p"
Defines the starting position for the first image. The default is 0p, meaning before the first paragraph. <dpStory imageStart="3p"> would display the first image after the 3rd paragraph.

imageStop="#p"
Defines the ending position for the last image. This is only relevant if there is more then one image to be displayed. This is usually used in conjunction with <dpImageStart> to define a range where images should be displayed. The default is 3/4 through the story, meaning the last image will display at that position.

Examples:

<dpStory imageStart="2p" imageStop="10p">
This would put the first image after the second paragraph, and the last image after the 10th paragraph. All of the remaining images would be equidistantly dispersed within this range.

<dpStory imageStop="14p">
If this story had three images, the first image would be before the first paragraph (default). The middle image would be after the 7th paragraph, and the last image would be after the 14th paragraph. If there was only one image, it would still be before the first paragraph and the imageStop attribute would be ignored.

imageMacro="macro name"
The <dpStory> image shorthand is quite flexible and easy to use, but it always uses a pre-defined table that is hard coded into Dispatch. The imageMacro attribute allows you to override this table format and use a layout of your choosing.

When defining this layout, you can use any HTML you want and image tags "without" the number attribute. Dispatch will handle advancing the number values for the appropriate images. You may also use other Dispatch tags like conditional statements.

For example:

<dpMacro myImageLayout>
  <table border=1 align="<dpImageAlign>" width="<dpImageWidth>">
    <tr>
      <td>
        Image Table<br>
        <dpImage><br>
        <i><dpImageCaption></i><br>
        <font size=2><dpImageArtist></font>
      </td>
    </tr>
  </table>
</dpMacro>

Note: Like all macros, this macro needs to be declared before it is used, meaning it must be above whatever references it within your template.

Usage would be as follows:

<dpStory images="all" imageMacro="myImageLayout">

Please refer to the common attributes page for the common attribute descriptions.


Home: Support: Reference Guide: Display Tags: <dpStory>
Questions? Comments?
Please write support@desert.net.