Mehr Möglichkeiten seit w2d 6.0
Die kompliziert erscheinenden Lösungen für individuelle Tabellen mit w2d 5.0 stehen ab w2d 6.0 teilweise automatisiert zur Verfügung. Neu ist beispielsweise die Möglichkeit, Inhalte in Tabellenspalten differenziert auszurichten.
Auch wurden die Rechenfunktionen erweitert, sodass man kombiniert mit den an anderer Stelle festgelegten Plugin-Breitenangaben, genau berechnen (lassen) kann, wie breit Spalten in Abhängigkeit vom Vorhandensein einer Sidebar (oder nicht) und beim Einsatz von Grafiken sein werden.
paragraph_table.ccml für w2d 6.0
code ansehen
CCML:
<cc:*>
--------------------------------------------------
Web2Date
Autor der
Modifikationen: Webdesignconsult.de
Datei: paragraph_table.ccml
Funktion: Tabelle
--------------------------------------------------
</cc:*>
<table class="content" width="<cc:print value="&plugin.width">px">
<cc:loop type="row" obj="myrow">
<cc:if cond="&myrow.number | 2=1">
<cc:if cond="&myrow.header"><tr class="header">
<cc:else><tr class="even"></cc:if>
<cc:else><tr class="odd"></cc:if>
<cc:loop type="col" obj="mycol" row="&myrow.number">
<cc:if cond="&myrow.header"><td class="headercell" style="width:<cc:print value="&mycol.width">%; text-align:<cc:print value="&mycol.align">;">
<cc:else>
<cc:if cond="&mycol.header"><td class="colheadercell" style="width:<cc:print value="&mycol.width">%; text-align:<cc:print value="&mycol.align">;vertical-align:top !important;">
<cc:else>
<cc:if cond="&mycol.picture"><td class="tablepic" style="width:<cc:print value="&mycol.width">%; text-align:center;">
<cc:else>
<td class="cell" style="text-align:<cc:print value="&mycol.align">;vertical-align:top !important;"></cc:if></cc:if></cc:if>
<cc:if cond="&mycol.picture">
<cc:picture uid="&mycol.picture" obj="tablepic" width="&plugin.width * &mycol.width / 100 - 30" suffix="'table'+&mycol.width">
<cc:if cond="&mycol.picture.zoom.isonsite"><a href="<cc:print value="&mycol.picture.zoom.url">" title="Diese Grafik führt zu: <cc:print value="&mycol.picture.zoom.url">"><cc:printpicture xhtml="1" obj="tablepic" suffix="'table'+&mycol.width" alt="¶.caption" title="¶.caption"></a></cc:if>
<cc:if cond="&mycol.picture.zoom.isoffsite"><a href="<cc:print value="&mycol.picture.zoom.url">" title="Diese Grafik führt zu einem Ergebnis ausserhalb dieses Webangebots"><cc:printpicture xhtml="1" obj="tablepic" suffix="'table'+&mycol.width" alt="¶.caption" title="¶.caption"></a></cc:if>
<cc:if cond="&mycol.picture.zoom.isnone"><cc:printpicture xhtml="1" obj="tablepic" suffix="'table'+&mycol.width" alt="¶.caption" title="¶.caption"></cc:if>
<cc:if cond="&mycol.picture.zoom.ispicture"><cc:picture uid="&mycol.picture.zoom.uid" obj="hugepic"><a rel="lightbox[<cc:print value="¶.caption">]" href="<cc:printpictureurl obj="hugepic">"><cc:printpicture xhtml="1" obj="tablepic" suffix="'table'+&mycol.width" alt="¶.caption" title="¶.caption"></a></cc:if>
<cc:if cond="&mycol.picture.zoom.isdownload"><cc:download uid="&mycol.picture.zoom.uid" obj="mydownload"><a href="<cc:print value="&mydownload.url">" title="Diese Grafik führt zum Download"><cc:printpicture xhtml="1" obj="tablepic" suffix="'table'+&mycol.width" alt="¶.caption" title="¶.caption"></a></cc:if>
<cc:else>
<cc:if cond="&mycol.empty"> <cc:else><cc:print value="&mycol.text"></cc:if></cc:if></td>
</cc:loop>
</tr>
</cc:loop>
</table>
<br />
Eine Abfrage, die die Gesamtbreite der Tabelle in Abhängigkeit von einer Sidebar ermittelt, ist nicht mehr erforderlich.
Damit das funktioniert, müssen allerdings an anderen Stellen, nämlich in der style.css (bei Fullcontentmöglichkeit in den sidebar_yes- / sidebar_no-CSS-Dateien) und in der navigation.ccml entsprechende Bedingungen, die die Plugin-Breitenangababen betreffen, eingebaut werden. Im Gegenzug entfällt der Eintrag in der config.ccml.