Domanda

I'm using SP2010, and need a specific view of my custom list. My custom list is defined as the follows:

Column 1 name = "Project Name"               Data type = Single line of text
Column 2 name = "Step one complete"          Data type = Choice (Yes or No)
Column 3 name = "Step two complete"          Data type = Choice (Yes or No)
Column 4 name = "Pass through the gate"      Data type = Choice (Yes or No)

I am trying to create a custom view of my list to be like the image below:

screenshot

Is this possible to do through a custom view of the list, or is there a better out of the box way of doing this?

È stato utile?

Soluzione

I had same requirement in one of my project. For this i added a content query webpart and i added the xslt in the ItemStyles.xsl, with custom styles. That pulls the all the coloums in the list.

I think it is the one of the solution to you.

Edit:

<xsl:template name="PageBlocksWithoutDescription" match="Row[@Style='PageBlocksWithoutDescription']" mode="itemstyle">            
    <xsl:variable name="SafeImageUrl">
        <xsl:call-template name="OuterTemplate.GetSafeStaticUrl">
            <xsl:with-param name="UrlColumnName" select="'PublishingPageImage'"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="SafeLinkUrl">
        <xsl:call-template name="OuterTemplate.GetSafeLink">
            <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="DisplayTitle">
        <xsl:call-template name="OuterTemplate.GetTitle">
            <xsl:with-param name="Title" select="@Title"/>
            <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
        </xsl:call-template>
    </xsl:variable>
    <xsl:variable name="LinkTarget">
        <xsl:if test="@OpenInNewWindow = 'True'" >_blank</xsl:if>
    </xsl:variable>
    <div>       
    <ul style=" width:1000px;">
    <a href="{@BlockUrl}">
    <li style="background-color: #F99E2E;color: #FFF;display: inline-table;font-family: Verdana;font-size: 13px;height: 130px;list-style: none outside none;padding: 10px 15px 5px 17px;width: 269px;margin:0px 3px 12px 8px;display:inline-block;float:left;">
    <div style=" font-family:Segoe UI Semibold; font-size: 16px;text-transform:uppercase">
    <xsl:value-of select="$DisplayTitle"/>
    </div>     
    </li>
    </a>
    </ul>               
    </div>        
</xsl:template>

Add it at the end of ItemStyles.xsl and in the content query webpart-> edit webpart->Content Query Tool Part->Presentation->Styles->Item Styles you will get "PageBlocksWithoutDescription". Select it and Below that Feeds To Dispaly tab select the fields to display.

Altri suggerimenti

I would start looking into a DataView, XsltListView, or ContentQuery web part for this. Theyre all out of the box web parts that allow you to customize the presentation with XSLT.

You cannot do this with custom views out of the box. You will need to write a custom web part for this.

The image is not opening for me... There is a way in out of the box to view the list vertically... click modify view>>under the section style select the view style 'Boxed'... Hope this helps... you can even edit in SharePoint designer to fulfill your requirement...

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top