MACROMEDIA CONTRIBUTE 3-DEPLOYING CONTRIBUTE Guida Utente Pagina 52

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 142
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 51
52
Serena® Collage® 5.1.3
Chapter 3 Design-Time Component Reference
Querying for Contribution Field Content
The following is an example AssetQuery component that retrieves and displays the
content from a field in a contribution asset.
The results of this query may look something like:
You can also link to HTML versions of contribution assets by making the following changes
to the above example. The HTML version of the asset will always be generated in the
same location as the layout file for the asset.
Add a
layout
property to the
<nexus:component>
tag. This property identifies the
contribution layout file that you want to use to create the HTML version of the asset.
For example,
layout="techbrief_layout.htm"
.For more information see Chapter
4, "Layout Contribution Component Reference" on page 121.
<nexus:component classid="nexus/components/AssetQuery"
code="$nexusComponents"
root="/Website/TechBriefs"
Filter="A.AssetType='techbrief'" max=5 OrderbyCode="d">
<nexus:prelog>
<font size="2" color="darkblue" face="arial">
<strong>Most Recent Tech Briefs</strong>
</font>
<ul>
</nexus:prelog>
<li>
<font face="Times,Times New Roman" size="2"
color="black">Title: $node.contribution("title")
</font>
<nexus:prolog>
</ul>
</nexus:prolog>
</nexus:component>
Filter property limits
query to techbrief
asset type
Retrieves 5
Prelog defines and
header, and creates
an unordered list
formats a small
assets, and
sorts them
by date
All HTML between the
prelog and prolog is
repeated for each asset;
each appears as a
bulleted list item
$node.contribution("title") retrieves and
displays the content of the "title" contribution
field for each asset that is queried
Prolog closes the
unordered list
NOTE
You can use any layout file that you want, not just the layout file that is associated
with the contribution asset type in Collage. In this way, you can allow your site users
to display contribution assets in more than one format. You can cater look and feel to
different types of users without having to create duplicate contribution assets.
Vedere la pagina 51
1 2 ... 47 48 49 50 51 52 53 54 55 56 57 ... 141 142

Commenti su questo manuale

Nessun commento