user346514
user346514

Reputation: 513

DataView WebPart in sharepoint designer

I would like to display the list items using DataView WebPart and I am successful so far. But I would like to show the items in two columns for each row, instead of one columns per one row. How can i achieve this.

<tr>
            <xsl:if test="position() mod 2 = 1">
                <xsl:attribute name="class">ms-alternating</xsl:attribute>
            </xsl:if>
            <xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
                <td class="ms-vb" width="1%" nowrap="nowrap">
                    <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
                </td>
            </xsl:if>
            <xsl:variable name="ImageURL">
  <xsl:value-of select="@ImageURL" /> 
  </xsl:variable>

            <td class="ms-vb">

                <img alt="" src="{$ImageURL}"  />
                </td>
        </tr>

I would like to show the items from a list in two columns and the table should be increased dynamically based on the number of items. Can someone guide me on how to achieve this.

Upvotes: 0

Views: 2192

Answers (1)

Nezih TINAS
Nezih TINAS

Reputation: 11

Actually you can achieve this more easily with Item Lister Web Part. Try to check that out.

Upvotes: 1

Related Questions