Kuonyesha Content Query Results Sehemu Web katika Grid / Meza

Overview na Lengo

Nje ya boksi, Moss’ Content Query Mtandao Sehemu ya (CQWP) maonyesho ya matokeo yake katika muundo wa orodha, similar to search results. It is also possible to display the results in a grid format (i.e. HTML meza format). Grid formats are better in some circumstances. I describe how to achieve that effect in this article.

Biashara Igizo

I have worked with a client on an enterprise-wide MOSS rollout. We have designed their taxonomy such that projects are first class citizens in the hierarchy and have their own top level site. Project managers maintain a singleton list of project summary information, kama vile jina, bajeti, inatarajiwa kukamilika tarehe, remaining budget and other summary type fields. By "singleton" I mean a custom SharePoint list guaranteed to contain only one item. Simplistically, inaonekana kama hii:

picha

mbinu ya kiufundi ni nyingi sawa kama ilivyoelezwa hapa (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!447.entry). The CQWP uses an XSL transform to emit HTML for the browser to render.

I always envision the result before diving into the XSL because XSL is a nightmare. Here’s my desired result:

picha

HTML kama hii inazalisha kwamba matokeo:

<html>
 <mwili>
 <kituo cha>
 <meza mpaka= 1>

<!-- Labels ->
 <tr Bgcolor= Blue>
 <td><ni Michezo= Nyeupe><b>Mradi Jina</b></ni></td>
 <td align= Haki><ni Michezo= Nyeupe><b>Kukamilisha Tarehe</b></ni></td>
 <td align= Haki><ni Michezo= Nyeupe><b>Bajeti ya</b></ni></td>
 <td align= Haki><ni Michezo= Nyeupe><b>Gharama halisi</b></ni></td>
 <td><ni Michezo= Nyeupe><b>Hali ya jumla ya</b></ni></td>
 </tr>

<tr>
 <td>Re-waya chumba cha kompyuta.</td>
 <td align= Haki>02/01/08</td>
 <td align= Haki>22,500.00</td>
 <td align= Haki>19,000.00</td>
 <td>Katika Maendeleo</td>
 </tr>

<tr>
 <td>Utoaji servrar kwa Upgrade SQL</td>
 <td align= Haki>04/01/08</td>
 <td align= Haki>7,500.00</td>
 <td align= Haki>0.00</td>
 <td>Planned</td>
 </tr>

</meza>
 </kituo cha>
 </mwili>
</html>

Mbinu

Fuata hatua hizi ili kujenga gridi ya taifa:

  1. Kutambua vipengele wa gridi ya taifa (safu / nguzo).
  2. Kuainisha na kujenga nguzo muhimu tovuti.
  3. Kujenga maeneo ndogo kwa ajili ya miradi na orodha Singleton.
  4. Kuongeza CQWP ukurasa wa mtandao na configure ni kutafuta orodha yako.
  5. Kurekebisha XML CQWP wa kukusanya up nguzo ya ziada.
  6. Kurekebisha XSL kuzalisha meza.

I’m going to concentrate on number six. Numbers one through four are straight-forward and something that any CQWP user has already done. Number five has been well-documented by others including this exhaustive screen-shot laden article from MSDN hapa (http://msdn2.microsoft.com/en-us/library/bb897399.aspx) na blog Heather wa Solomoni hapa (http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx).

Na karanga Bolts

Kuanza na kutekeleza hatua moja kwa njia ya tano kama kwa nyaraka MSDN na makala Heather wa Solomoni.

Katika hatua hii, ve aliongeza CQWP yako ya ukurasa na una yako <CommonViewFields> kimeundwa kama ni muhimu.

Kufuatia hatua kawaida, Mimi kupata matokeo haya ya kati:

1. Kujenga aina ya maudhui, a templatized custom list for that content type and two sites. Here is the content type:

picha

Hapa ni muundo wa tovuti:

picha

2. Kuongeza CQWP baada ya kujenga mradi subsites yangu na orodha ya mradi Singleton muhtasari:

picha

3. Kuongeza taarifa yote ya ziada nataka kupitia <CommonViewFields>:

        <mali jina="CommonViewFields" aina="string">Project_x0020_Name;Project_x0020_Expenses;Project_x0020_Status;Project_x0020_Start_x0020_Date;Project_x0020_End_x0020_Date;Project_x0020_Budget</mali>

Kumbuka kuwa nilikuwa na kuweka mashamba yote mali kwa line moja au itakuwa si kazi (CQWP bila kuniambia kuwa hoja akarudi vitu hakuna).

4. Katika hatua hii, we’re ready to move beyond the MSDN article and flip on over to Heather Solomon’s article. Follow her steps starting near step #5 kujenga customized / unghosted version of ItemStyle.xsl. I follow Heather’s advice, juu kupitia hatua 11 na kupata matokeo haya ya kati:

4.1: Jina langu XSL template kama ifuatavyo:

<xsl:template jina = "Grid" mechi = "Row[@Style=’Grid’]" mode = "itemstyle">

Mimi pia kidogo kurekebisha yake alipendekeza <xsl:kwa-kila …> kwa kuongeza <br /> kumtambulisha kutoa orodha safi:

    <xsl:kwa-kila kuchagua="@ *">
      P:<xsl:thamani ya kuchagua="jina()" /><br/>
    </xsl:kwa-kila>

4.2: Mimi kurekebisha sehemu mtandao, kwenda kuonekana na kuchagua yangu "Grid" style:

picha

Kuomba mabadiliko na hapa ni matokeo:

picha

Tunaweza kuona kutoka juu kwamba mashamba tunataka (Mradi jina, gharama, hadhi, nk) are available for us to use when we emit the HTML. Not only that, but we see the names by which we must reference those columns in the XSL. Kwa mfano, sisi rejea Mradi Hali kama "Project_x005F_x0020_Name".

Katika hatua hii, sisi kuondoka blog Heather na kutoka mabega ya makubwa haya, Mimi kuongeza kidogo yangu kidogo.

ContentQueryMain.xsl

NOTE: Wakati wa kufanya mabadiliko ya ContentQueryMain.xsl wote kama vile ItemStyle.xsl, haja ya kuangalia files kurejesha kabla ya kuona athari za mabadiliko yako.

Kwa ajili ya gridi ya maamuzi madhumuni, MOSS uses two different XSL files to produce the results we see from a CQWP. To generate the previous bit of output, we modified ItemStyle.xsl. MOSS actually uses another XSL file, ContentQueryMain.xsl to in conjunction with ItemStyle.xsl to generate its HTML. As its name implies, ContentQueryMain.xsl ni kuu "" XSL that controls the overall flow of translation. It iterates through all the found items and passes them one by one to templates in ItemStyle.xsl. We’ll modify ItemStyle.xsl to generate the open <meza> tag kabla kutotoa moshi safu ya kwanza ya data na kufunga <meza> tag after emitting the last row. To accomplish this, ContentQueryMain.xsl ni iliyopita kwa kupitisha vigezo mbili katika gridi ya taifa yetu "" template katika ItemStyle.xsl, "Mwisho mstari" and "current row". ItemStyle.xsl uses these to conditionally emit the necessary tags.

Kutumia mbinu Heather wa Solomoni, we locate ContentQueryMain.xsl. It is located in the same place as ItemStyle.xsl. This screen shot should help:

picha

Tunahitaji kufanya marekebisho yafuatayo:

  • Kurekebisha template xsl, "CallItemTemplate" that actually invokes our Grid template in ItemStyle.xsl. We will pass two parameters to the Grid template so that it will have the data it needs to conditionally generate opening and closing <meza> tags.
  • Kurekebisha mwingine kidogo ya ContentQueryMain.xsl kwamba wito CallItemTemplate "" kupita ni LastRow "" parameter ili LastRow wanaweza kufikishwa kwa Grid template wetu.

Machapisho template aitwaye "OuterTemplate.CallItemTemplate" kutambuliwa na kamba:

  <xsl:template jina="OuterTemplate.CallItemTemplate">

Kuchukua nafasi ya template nzima kama ifuatavyo:

  <xsl:template jina="OuterTemplate.CallItemTemplate">
    <xsl:kuacha jina="CurPosition" />

    <!--
      Kuongeza LastRow "" parameter.
      Sisi tu kutumia wakati style bidhaa kupita katika ni "Grid".
    -->
    <xsl:kuacha jina="LastRow" />

    <xsl:kuchagua>
      <xsl:wakati mtihani="@ Sinema = 'NewsRollUpItem'">
        <xsl:kuomba templates- kuchagua="." mode="itemstyle">
          <xsl:na-param jina="EditMode" kuchagua="$cbq_iseditmode" />
        </xsl:kuomba templates->
      </xsl:wakati>
      <xsl:wakati mtihani="@ Sinema = 'NewsBigItem'">
        <xsl:kuomba templates- kuchagua="." mode="itemstyle">
          <xsl:na-param jina="CurPos" kuchagua="$CurPosition" />
        </xsl:kuomba templates->
      </xsl:wakati>
      <xsl:wakati mtihani="@ Sinema = 'NewsCategoryItem'">
        <xsl:kuomba templates- kuchagua="." mode="itemstyle">
          <xsl:na-param jina="CurPos" kuchagua="$CurPosition" />
        </xsl:kuomba templates->
      </xsl:wakati>

      <!--
              Kupita nafasi ya sasa na lastrow kwa template itemstyle.xsl Grid.
              ItemStyle.xsl kutumia kwamba emit wazi na kufunga <meza> tags.
      -->
      <xsl:wakati mtihani="@ Sinema = 'Grid'">
        <xsl:kuomba templates- kuchagua="." mode="itemstyle">
          <xsl:na-param jina="CurPos" kuchagua="$CurPosition" />
          <xsl:na-param jina="Mwisho" kuchagua="$LastRow" />
        </xsl:kuomba templates->
      </xsl:wakati>

      <xsl:vinginevyo>
        <xsl:kuomba templates- kuchagua="." mode="itemstyle">
        </xsl:kuomba templates->
      </xsl:vinginevyo>
    </xsl:kuchagua>
  </xsl:template>

maoni kuelezea madhumuni ya mabadiliko.

Bila shaka, OuterTemplate.CallItemTemplate "" is itself called from another template. Locate that template by searching for this text string:

<xsl:template jina="OuterTemplate.Body">

Kitabu kupitia maelekezo katika OuterTemplate.Body na kuingiza parameter LastRow kama ifuatavyo (umeonyesha kama maoni katika italics):

<xsl:wito-template jina="OuterTemplate.CallItemTemplate">
  <xsl:na-param jina="CurPosition" kuchagua="$CurPosition" />
  <!-- Ingiza parameter LastRow. -->
  <xsl:na-param jina="LastRow" kuchagua="$LastRow"/>
</xsl:wito-template>

Baada ya huu, sisi hatimaye kuwa mambo kuweka vizuri ili ItemStyle.xsl yetu inaweza emit <meza> tags katika mahali sahihi na.

ItemStyle.Xsl

NOTE: Tena, kuangalia katika ItemStyle.xsl baada ya kufanya mabadiliko yoyote ili kuona athari ya mabadiliko hayo.

Tuna kazi mbili hapa:

  • Replace the entire Grid template. You can copy/paste from below.
  • Kuongeza baadhi ya jumbo Mumbo nje ufafanuzi template kwamba inawezesha "formatcurrency" template to work. (Unaweza kuwaambia kwamba mimi kushughulikia tenuous juu XSL).

Kwanza, karibu na juu ya ItemStyle.xsl, kuongeza mstari huu:

  <!-- Baadhi ya jumbo Mumbo kwamba unatuwezesha kuonyesha U.S. sarafu. -->
  <xsl:decimal-format jina="wafanyakazi" tarakimu="D" />

  <xsl:template jina="Default" mechi="*" mode="itemstyle">

Kumbuka kwamba mimi aliongeza ni moja kwa moja kabla ya <xsl:template jina = "Default" …> ufafanuzi.

Ijayo, go back to our Grid template. Replace the entire Grid template with the code below. It is thoroughly commented, lakini usisite kunitumia email au kuacha maoni kwenye blog yangu kama una maswali.

  <xsl:template jina="Gridi ya taifa" mechi="Row[@ Sinema = 'Grid']" mode="itemstyle">

    <!--
      ContentMain.xsl hupita CurPos na wa mwisho.
      Sisi kutumia haya masharti emit wazi na kufunga <meza> tags.
    -->
    <xsl:kuacha jina="CurPos" />
    <xsl:kuacha jina="Mwisho" />

    <!-- vigezo zifuatazo unmodified kutoka ItemStyle.xsl kiwango -->
    <xsl:variable jina="SafeImageUrl">
      <xsl:wito-template jina="OuterTemplate.GetSafeStaticUrl">
        <xsl:na-param jina="UrlColumnName" kuchagua="'ImageUrl'"/>
      </xsl:wito-template>
    </xsl:variable>
    <xsl:variable jina="SafeLinkUrl">
      <xsl:wito-template jina="OuterTemplate.GetSafeLink">
        <xsl:na-param jina="UrlColumnName" kuchagua="'LinkUrl'"/>
      </xsl:wito-template>
    </xsl:variable>
    <xsl:variable jina="DisplayTitle">
      <xsl:wito-template jina="OuterTemplate.GetTitle">
        <xsl:na-param jina="Title" kuchagua="@ Title"/>
        <xsl:na-param jina="UrlColumnName" kuchagua="'LinkUrl'"/>
      </xsl:wito-template>
    </xsl:variable>
    <xsl:variable jina="LinkTarget">
      <xsl:kama mtihani="@ OpenInNewWindow = 'kweli'" >_blank</xsl:kama>
    </xsl:variable>

    <!--
      Hapa sisi define variable, "TableStart".  Hii ina HTML
      .  Kumbuka kwamba kama CurPos = 1, ni pamoja na HTML katika tag CDATA.
      Vinginevyo, itakuwa tupu.

      thamani ya tableStart ni emited ItemStyle kila wakati inaitwa kupitia
      .
    -->
    <xsl:variable jina="tableStart">
      <xsl:kama mtihani="$CurPos = 1">
        <![CDATA[
        <meza mpaka = 1>
          <tr Bgcolor = "blue">
            <td><font Michezo = "nyeupe"><b>Mradi Jina</b></ni></td>
            <td align = "haki"><font Michezo = "nyeupe"><b>Kukamilisha Tarehe</b></ni></td>
            <td align = "haki"><font Michezo = "nyeupe"><b>Bajeti ya</b></ni></td>
            <td align = "haki"><font Michezo = "nyeupe"><b>Gharama halisi</b></ni></td>
            <td><font Michezo = "nyeupe"><b>Hali ya jumla ya</b></ni></td>
          </tr>
        ]]>
      </xsl:kama>
    </xsl:variable>

    <!--
      Mwingine variable, tableEnd tu amefafanua meza kufunga tag.

      Kama na tableStart, inazidi daima emited.  Hii ni kwa nini thamani yake ni
      .
    -->
    <xsl:variable jina="tableEnd">
      <xsl:kama mtihani="$CurPos = $ Mwisho">
        <![CDATA[ </meza> ]]>
      </xsl:kama>
    </xsl:variable>

    <!--
      Daima emit yaliyomo ya tableStart.  Kama hii si mara ya kwanza
      , basi tunajua thamani yake
      .

      Lemaza pato kukimbia kwa sababu wakati tableStart kuwa si tupu, ni
      .  Kama
      , itakuwa kuzalisha&lt;meza&gt;" badala ya "<meza>".
    -->
    <xsl:thamani ya kuchagua="$tableStart" Disable-pato-kukimbia="ndiyo"/>


    <tr>
      <!--
      P:Project_x005F_x0020_Name
      :Project_x005F_x0020_End_x005F_x0020_Date
      :Project_x005F_x0020_Budget
      :Project_x005F_x0020_Expenses
      :Project_x005F_x0020_Status
      -->
      <td>
        <xsl:thamani ya kuchagua="@ Project_x005F_x0020_Name"/>
      </td>

      <td align="haki">
        <xsl:thamani ya kuchagua="@ Project_x005F_x0020_End_x005F_x0020_Date"/>
      </td>

      <td align="haki">
        <xsl:wito-template jina="formatCurrency">
          <xsl:na-param jina="thamani" 
kuchagua="@ Project_x005F_x0020_Budget"></xsl:na-param> </xsl:wito-template> </td> <td align="haki"> <xsl:wito-template jina="formatCurrency"> <xsl:na-param jina="thamani" kuchagua="@ Project_x005F_x0020_Expenses">
</xsl:na-param> </xsl:wito-template> </td> <td> <xsl:thamani ya kuchagua="@ Project_x005F_x0020_Status"/> </td> <!-- Yote ya yafuatayo ni maoni nje kufafanua mambo. Hata hivyo, kuleta kwa nyuma na mambo ya kuwa katika <td> kuona wake         . --> <!-- <div id = "linkitem" darasa = "item"> <xsl:kama mtihani = "string-urefu($SafeImageUrl) != 0 "> <div darasa = "SafeImageUrleft"> <href = "{$SafeLinkUrl}" lengo = "{$LinkTarget}"> <img darasa = "image-fasta-width src = "" src="{$SafeImageUrl}"
alt = "{@ ImageUrlAltText}"/> </a> </div> </xsl:kama> <div darasa = "link-item"> <xsl:wito-template
name="OuterTemplate.CallPresenceStatusIconTemplate"/> <href = "{$SafeLinkUrl}"
lengo = "{$LinkTarget}" title = "{@ LinkToolTip}"> <xsl:thamani ya kuchagua = "$ DisplayTitle" /> </a> <div darasa = "maelezo"> <xsl:thamani ya kuchagua = "@ Description" /> </div> </div> </div>
--> </tr> <!-- Emit meza kufunga tag. Kama sisi si juu ya mstari wa mwisho, hii itakuwa tupu. --> <xsl:thamani ya kuchagua="$tableEnd" Disable-pato-kukimbia="ndiyo"/> </xsl:template> <xsl:template jina="formatCurrency"> <xsl:kuacha jina="thamani" kuchagua="0" /> <xsl:thamani ya kuchagua='format-idadi($thamani, "$ DDD,DDD,DDD.DD ", "Mfanyakazi")' /> </xsl:template>

22 mawazo juu ya "Kuonyesha Content Query Results Sehemu Web katika Grid / Meza

  1. Andreas

    Aah… ni kwa sababu mimi aitwaye Orodha wangu Sinema tofauti na hawakujua kwamba katika ContentQueryMain.xsl ni hundi kwa ajili ya "style":

    <xsl:wakati mtihani = "Sinema @ = 'NameOfMyStyle'">

    Pamoja na kwamba jina ni kazi. 🙂

    Kujibu
  2. Andreas

    Ni karibu kazi kwa ajili yangu: Mimi kusimamia na pato </meza> mwisho tag usahihi, lakini tag kuanzia ni kukosa. Inaonekana mtihani = "$ CurPos = 1" haina kurudi kweli. Lakini kwa nini?

    Kujibu
  3. Anand singh Rawat

    Kubwa Post. Paulo i wamefanya mambo yote hapo juu. Nina hoja, jinsi gani ninaweza achive jumla ya "Expences Jumla halisi" au jumla ya thamani ya safu mbili.

    Kujibu
  4. Lisa

    Umefanya kazi yoyote na kujenga desturi ContentQueryMain na ItemStyle xsl files? Sababu ya mimi kuuliza ni kwamba sitaki na wasiwasi juu ya mitindo yangu desturi kuwa overwritten na patches yoyote au upgrades. Je, kuwa na mifano? Nimekuwa alijaribu kufanya nakala kufanana wa ContentQueryMain.xsl na kuweka kwamba mwezi desturi nakala Library Sinema. Wakati kuweka kumbukumbu ya faili hii xsl katika mali ya webpart. MainXslLink, Mimi kupata 401 hana mamlaka. desturi xsl file ni toleo kuchapishwa na kila mtu aliyesoma huduma hiyo.

    Kujibu
  5. Greg Sheridan

    Hi, hii alikuwa msaada kweli posting. Mimi ni wote wanaofanya kazi, na pia kutekelezwa mabadiliko Mike Brown hivyo vikundi
    Matokeo ya ndani ya meza na chochote mimi kuchagua kama Group By parameter katika mali CQWB ya.
    Mimi alifanya cheo link pia, hivyo ni kazi nicely. Mimi bado nina tatizo moja, ingawa. Mimi nina katika makundi matokeo kwa jina tovuti. Ndani ya meza, ni makundi yao nicely, na inaonekana ni kubwa, lakini inazidi bado uchapishaji nje zote za kundi
    majina(katika kesi yangu tovuti majina) juu ya meza. Je, mtu yeyote kujua jinsi ya kujikwamua haya?
    Shukrani,
    Greg

    Kujibu
  6. Hakuna jina

    Nice makala. Mimi imeweza kutoa meza yangu ya kuangalia ya Lists Sharepoint default na kuchambua code chanzo cha orodha. Hapa ni kuu HTML vitalu zinahitajika kwa kufaa katika ItemStyle:

    <TABLE width = "100%" darasa = "ms-listviewtable" mpaka = 0 cellspacing = 0 cellpadding = 1 dir = "Hakuna hata mmoja">

    <!–Header–>
    <TR darasa = "ms-viewheadertr" VALIGN = TOP>
    <TH nowrap wigo = "col" darasa = "ms-vh2"><div style = "width:100%;nafasi:jamaa;kushoto:0;juu:0;">
    <TABLE style = "width:100%;" CtxNum = "1" urefu = "100%" cellspacing = 1 cellpadding = 0 darasa = "ms-unselectedtitle">
    <TR>
    <TD width = "100%" Darasa = "ms-VB" nowrap>
    Title Nakala hapa

    </TD>
    <TD style = "Msimamo:kabisa;">
    </TD>
    </TR>
    </TABLE></div>
    </TH>

    <!–Kurudia kwa seli zote header–>
    </TR>

    <!– Meza ya data –>
    <TR darasa = "">
    <!–Data column, kutumia code ya Paulo kwa moja kwanza na hyperlink –>
    <TD Class = "ms-vb2">Data hapa</TD>

    <!–Tupu column–>
    <TD Class = "ms-vb2">
    <span dir = Hakuna hata></span><
    /TD>

    <!–Tarehe column–>
    <TD Class = "ms-vb2">
    <NOBR>11/12/2008</NOBR>
    </TD>
    </TR>

    <!–***Alternate mstari – Kutumia mpya XSL variable ambayo kuingiza darasa mbadala kulingana na mstari wa sasa modulo 2–>
    <TR darasa = "ms-alternating">

    </TR>
    </TABLE>

    Kujibu
  7. Mike Brown
    Zoltan,
    I was working on the same issue as you. I wanted all my items displayed in a grouped manner rather than just a lits. Here is how I achieved it.
    ContentQueryMain.xsl
    <xsl:wakati mtihani = "Sinema @ = 'Grid'">
    <xsl:kuomba-templates kuchagua = "." mode = "itemstyle">
    <xsl:na-param name = "CurPos" kuchagua = "$ CurPosition" />
    <xsl:na-param name = "Mwisho" kuchagua = "$ LastRow" />
    <!–kuongeza sehemu hii mpya itakuwa katika parameter kuonyesha kundi jipya imeanza–>
    <xsl:na-param name = "StartNewGroup" kuchagua = "@ __begingroup" />
    </xsl:kuomba templates->
    </xsl:wakati>
    ItemStyle.xsl
    Kuongeza parameter yako
    <xsl:param name = "StartNewGroup" />
    Kuongeza maandiko haya kama safu ya kwanza ya data
    <xsl:kuchagua>
    <xsl:when test="$StartNewGroup = ‘True’">
    <tr>
    <td >
    <xsl:wito-template jina = "OuterTemplate.GetGroupName">
    <xsl:na-param name = "GroupName" kuchagua = "@ *[jina()= $ Group]"/>
    <xsl:na-param name = "GroupType" kuchagua = "$ GroupType" />
    </xsl:wito-template>
    </td>
    </tr>
    </xsl:wakati>
    <xsl:vinginevyo>
    </xsl:vinginevyo>
    </xsl:kuchagua>
    This should take care of your grouping issue in your grid. Each group will now begin with a new row indicating the group name. In my solution I actually added a blank <td /> katika data na Indent ni pamoja ili kambi ya kusimama bora zaidi.
    Site1
    datacolumn1 datacolumn2 datacolumn3 etc

    datacolumn1 datacolumn2 datacolumn3 etc
    Site2
    datacolumn1 datacolumn2 datacolumn3 etc
    Site3

    datacolumn1 datacolumn2 datacolumn3 etc

    datacolumn1 datacolumn2 datacolumn3 etc
    nk.
    Kujibu
  8. Zoltan
    Jambo Paulo,
    Shukrani kwa ajili ya post, i imeweza kuandaa wangu matokeo ya hoja katika gridi ya taifa, ambayo ni msaada sana. Hata hivyo, Niende zaidi na kundi matokeo yangu kwa kuzingatia Lugha. Kwa sasa, Majina Site zimeorodheshwa ya kwanza, na kisha kuna mmoja tu wa gridi ya taifa kubwa kukusanya safu yote kutoka maeneo mbalimbali. Kitu kama hii:
    Jina Site1
    Jina Site2
    Data katika gridi ya taifa kwa ajili ya maeneo yote
    Mawazo yoyote juu ya kile lazima kurekebisha ili kupata data zangu kama ifuatavyo:
    Jina Site1
    Data katika gridi ya taifa kwa ajili ya Site1
    Jina Site2
    Data katika gridi ya taifa kwa ajili ya Site2
    Shukrani mapema,
    Zoltan
    Kujibu
  9. Pierre Joubert
    Fantastic Post, kutatuliwa tatizo langu nilikuwa.
    Suala langu ni kuonyesha tu uwanja AssignedTo, Mimi configure kwa mtumiaji "" shamba aina na webpart nje basi maonyesho ya makosa yafuatayo:
    "Kulikuwa na makosa retrieving data kuonyesha katika Sehemu hii ya mtandao."
    Nimejaribu kutumia aina zote shamba inawezekana, na kitu chochote nyingine kwamba "Mtumiaji" haina kuonyesha kosa, but it does not display anything in the field. So I am assuming the User field type is correct, so I must be missing a setting somewhere.
    Mawazo yoyote juu ya hili?
    Regards
    Jiwe
    Kujibu
  10. Charftong
    Kubwa Post!!! Sana sana Helpful.
    Swali haraka, Umefanya kazi ya namna yoyote kwa kuonyesha mashamba AssignedTo au ModifiedBy na uwepo? Kwa sababu baadhi ya, wakati mimi kujaribu dipslay kwa ajili ya shamba katika CQWP, daima na maonyesho kama mfano "203;#Charf Tong". I cant find a way around this.
    Kujibu
  11. Jennifer Davis
    Paulo
    Kubwa makala, asante. Mimi kufanya kitu sawa sana lakini wanataka kuonyesha kuhusiana na tovuti ya mradi badala ya kipengele katika orodha. Kwa mfano, tuna 25 ngazi ya juu ya mradi maeneo na kila vyenye orodha na aina maudhui. Hizi ni Mradi Jina, Idara ya, Description. Mimi nataka kutumia hoja maudhui mtandao sehemu ya kuvuta data hii na wamefanikiwa ila kwa kuwa na default URL inachukua mimi kuingia katika orodha ya bidhaa na mimi kwa kweli wanahitaji hiyo kuchukua yangu kwenye mradi. unaweza kunipa ushauri wowote?
    Asante
    Tu
    Kujibu
  12. Paulo Galvin
    Kieren,
    I always use visual studio to edit the XSL. It provides color coding and it also has some good intellisense support.
    –Paulo
    Kujibu
  13. Kieran aliandika:

    Hi Paulo,

    Wakati wa kufanya kazi na xml / xsl na maudhui swala sehemu mtandao, kuwa ya kupatikana njia yoyote nzuri ya muundo xslt yako? Kujaribu kufanya mabadiliko na kujaribu kubuni ni kuthibitisha maumivu haki ** tu kwa kutumia mhariri Nakala…

    Yote bora

    Kujibu
  14. Michael Dipay
    Regarding the issue I was having last time where it doesn’t display the images from the grid view but instead displays the text (https://myweb.com/Marketing/images/icn-order.gif,). Mimi kusimamia na kutatua kwa kwa msaada wa Designer SharePoint kwa kujenga mtazamo desturi na kuchagua safu desturi kwamba mimi nataka kuonyesha. Nimeona kwamba aina images safu ni umeonyesha kama URL(comma) (e.g. https://myweb.com/Marketing/images/icn-order.gif,). format ya sasa ni Nakala, hivyo nina mabadiliko hayo ya Picha kutoka xsl Common:thamani ya Kazi -> Format kama PICHA. Mabadiliko ya onyesho hilo na picha desturi kwamba mimi alitaka kuonyesha. Mimi kunakiliwa code kuonyesha picha ( <img mpaka ="0" src="{substring-kabla ya(@ IcnOrder, ', ')}" /> ) And in the ItemStyle.xsl file I have to change the @PICTURECOLUMNNAME to the code <img mpaka ="0" src="{substring-kabla ya(@ IcnOrder, ', ')}" /> . Kisha kuokoa ni. Sasa meza yangu gridi ya matokeo kuonyesha Nakala kama vile nguzo picha desturi aina.
    Kujibu
  15. Helen
    Hi Paulo,
    Shukrani kwa ajili ya makala kubwa!
    Ulisema formatting masharti – "Unaweza pia kuweka masharti formatting, such as displaying projects who have exceeded their budget in red." Do you happen to have a code example for that?
    Shukrani tena!
    Helen
    Kujibu
  16. Michael Dipay
    Hi Paulo,
    It was a great article and was able to generate the same results as expected. Mimi kuwa na mahitaji ya kuonyesha picha katika gridi ya taifa kama moja ya nguzo yake. Siyo kuonyesha picha kwenye gridi ya taifa na badala yake maonyesho to na mfano na (,) comma mwishoni.
    (e.g. https://myweb.com/Marketing/images/icn-order.gif, )
    Nitumie Image au Picture katika Aina Field CommonViewFields? (e.g. InternalColumnName, Image)
    Shukrani,
    Mike
    Kujibu
  17. Saji Ijiyemi

    Your post is exactly what I was looking for. Hata hivyo, I can’t get it to work.

    I have documents that are stored in various doc. libraries but classified using a custom class column (choice: 1 au 2. I want to use CQWP to show these documents based on thier class.
    I was able to add the CQWP, export it to SPD, configure the itemStyle.xls to show custom fileds in list view. hata hivyo, I could not successfully implement what you describe here.

    These are the columns I want to show in my CQWP:

    File Type (to show icon)
    File Title
    Date Last Modified
    Modified By Who
    Checked Out To
    Checked In Comments

    I currently have the result in a list format. How do I change it to a talble format.

    Shukrani.

    Saji

    Kujibu

Kuondoka Reply

Anwani yako si kuchapishwa. Mashamba required ni alama *