<dpHeadline>
D E F I N I T I O N:
The headline of the story currently being built or queried.
<dpHeadline
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"
>
A T T R I B U T E S:
Please refer to the common attributes page for the common attribute descriptions.
E X A M P L E S:
|
<dpHeadline> |
All Fired Up |
|
<dpHeadline style="upper" style="spaced"> |
|
|
<b><dpHeadline link="on"></b><br> <dpSummary> |
All Fired Up The Steak-Out, home of the $30 steak with no potato, burned down a week ago last Saturday. |
Large Headline
To change the size of a Dispatch tag, use HTML tags such as header tags, fonts or style sheets.
T A G C O D E:
<font size="5"><dpHeadline></font>
E F F E C T:
Titanic Sinks! Hundreds Dead!
Color Headline
To change the appearance of a Dispatch tag, use HTML tags such as bold, italic, fonts, underlines, and style sheets.
T A G C O D E:
<font color="#3333FF"><dpHeadline></font>
E F F E C T:
Titanic Sinks! Hundreds Dead!
Upper Case Spaced Headline
Using the Dispatch style attribute, you can change the spacing of a tag for design purposes. You can also use additional styles to further adjust for your design.
Notice that two "style" attributes are used in the following example to achieve this effect.
T A G C O D E:
<dpHeadline style="upper" style="spaced">
E F F E C T:
Headline Test
If you want to test that a headline exists before displaying anything, you can use <dpIf>
T A G C O D E:
<dpIf <dpHeadline>>
<dpHeadline>
<dpElse>
Sorry no headline
</dpIf>
This can also be written in the following format. != means not equal.
<dpIf <dpHeadline> != "">
<dpHeadline>
<dpElse>
Sorry no headline
</dpIf>
E F F E C T:
If there was a headline, the following would display:
Titanic Sinks! Hundreds Dead!
Else if there wasn't a headline, the following would display:
Sorry no headline
Truncate Headline
Some designs may require that you limit the maximum length of a headline or another Dispatch tag. This can be achieved by using the "length" attribute.
The following examples limit the length of the headline by character and word.
T A G C O D E:
<dpHeadline length="20c">
<p>
<dpHeadline length="3w">...
E F F E C T:
Titanic Sinks! Hundr
Titanic Sinks! Hundreds...
Vertical Headline
The following example demonstrates how you can loop through a Dispatch tag to achieve a desired design effect.
T A G C O D E:
<tt>
<dpLoop var="i" from="1" to="<dpLength unit="c"><dpHeadline></dpLength>">
<dpHeadline start="resume" length="1c"><br>
</dpLoop>
</tt>
E F F E C T:
T
i
t
a
n
i
c
S
i
n
k
s
!
H
u
n
d
r
e
d
s
D
e
a
d
!
A D D I T I O N A L I N F O R M A T I O N:
The tag code loops through the headline one character at a time. It defines the length of the loop by determining the length of the headline (<dpLength unit="c"><dpHeadline></dpLength>").
For each iteration of the loop, the headline picks up where it left off (start="resume"), and displays one character (length="1c") followed by a line break.
Diagonal Headline
The following example demonstrates how you can loop through a Dispatch tag to achieve a desired design effect.
T A G C O D E:
<tt>
<dpLoop var="i" from="1" to="<dpLength unit="c"><dpHeadline></dpLength>">
<dpLoop var="j" from="1" to="<dpVar i>"> </dpLoop>
<dpHeadline start="resume" length="1c"><br>
</dpLoop>
</tt>
E F F E C T:
T
i
t
a
n
i
c
S
i
n
k
s
!
H
u
n
d
r
e
d
s
D
e
a
d
!
A D D I T I O N A L I N F O R M A T I O N:
The tag code loops through the headline one character at a time. It defines the length of the loop by determining the length of the headline (<dpLength unit="c"><dpHeadline></dpLength>").
For each iteration of the loop, a second loop is executed to insert spaces based on how many characters into the headline it currently is. Then the headline picks up where it left off (start="resume"), and displays one character (length="1c") followed by a line break.
| Home: Support: Reference Guide: Display Tags: <dpHeadline> | Questions? Comments? Please write support@desert.net. |