Txheej txheem cej luam thiab lub hom phiaj
Mus rau ntawm lub box, NTXHUAB’ Cov lus nug qhov Web Tshooj (CQWP) nws tau qhia nyob rau hauv ib daim ntawv teev hom, zoo li mus nrhiav tau. Nws tseem tau los tso saib qhov txheeb xyuas tau ib daim phiaj hom ntawv (i.e. Hom ntawv rooj HTML). Yog tawm tswv yim daim phiaj rau tej yam zoo. Kuv piav li cas after ntawd nyhuv hauv no Tshooj.
Lag luam Scenario
Kuv tau ua hauj lwm nrog ib tug neeg rau ib tug thoob plaws enterprise NTXHUAB rollout. Peb muaj tsim lawv taxonomy xws tias tej yaam num yog thawj class pej xeem nyob hauv lub hierarchy thiab muaj nyias qhov chaw saum theem. Yog ib qhov tswj khaws ib daim ntawv teev singleton uas yog ib qhov kev qhia, xws li lub npe, nyiaj txiag, cov kev tsim tiav tas hnub, nyiaj ntxiv thiab lwm yam kev teb. Yog "singleton" Kuv yog ib tug kev cai SharePoint sau guaranteed tau muaj cov yam khoom no tsuas muaj ib. Simplistically, nws zoo li no:
Txoj kev mus kom ze yog npaum li cas tau tib yam li koj piav ntawm no (http://paulgalvin.spaces.live.com/blog/cns!1CC1EDB3DAA9B8AA!447.entry). Cov CQWP siv ib XSL transform kom emit HTML rau qhov browser mus kav.
Ib txwm kuv envision hom kab mob qhov tshwm sim ua ntej nyiab loj mus rau lub XSL vim XSL yog ib tug npau suav phem. Ntawm no yog kuv yam tshwm sim:
HTML li no generates uas raug:
<html> <lub cev> <chaw> <cov lus ciam teb= 1> <!-- Hmong--> <tr bgcolor= xiav> <Td><Font xim= dawb><b>Qhov project Name</b></Font></Td> <Td dlhos= txoj cai><Font xim= dawb><b>Sau rau hnub tim</b></Font></Td> <Td dlhos= txoj cai><Font xim= dawb><b>Nyiaj txiag</b></Font></Td> <Td dlhos= txoj cai><Font xim= dawb><b>Cov nqi</b></Font></Td> <Td><Font xim= dawb><b>Zuag qhia tag nrho cov txheej xwm</b></Font></Td> </tr> <tr> <Td>Rov wire computer chav.</Td> <Td dlhos= txoj cai>02/01/08</Td> <Td dlhos= txoj cai>22,500.00</Td> <Td dlhos= txoj cai>19,000.00</Td> <Td>Dauv</Td> </tr> <tr> <Td>Ntaub ntawv servers rau SQL Upgrade</Td> <Td dlhos= txoj cai>04/01/08</Td> <Td dlhos= txoj cai>7,500.00</Td> <Td dlhos= txoj cai>0.00</Td> <Td>Los</Td> </tr> </cov lus> </chaw> </lub cev> </html> |
Mus kom ze
Ua raws li cov kauj ruam yuav tsim tau rau daim phiaj:
- Taw rau Cheebtsam ntawm hauv daim phiaj (natwm/txhua).
- Txhais kom meej thiab tsim nyog kawm ntawv txhua.
- Tsim cov chaw sub rau qhov tej yaam num thiab singleton npe.
- Ntxiv ntawm CQWP mus rau ib qhov web page thiab configure mus nrhiav koj lub npe.
- Hloov cov CQWP XML sau mus rau txhua yam.
- Hloov tus XSL yuav ua tau kom muaj ib lub rooj.
Kuv yuav mloog zoo hauv tus xovtooj rau. Ib ntawm plaub numbers ncaj nraim thiab tej yam uas muaj neeg siv CQWP twb tau. Naj npawb 5 lawm documented zoo los ntawm lwm tus xws li no exhaustive txhaj tshuaj ntsuam laden Tshooj ntawm MSDN ntawm no (http://msdn2.microsoft.com/en-us/library/bb897399.aspx) thiab Heather tus Xatau-ntoos lub blog ntawm no (http://www.heathersolomon.com/blog/articles/CustomItemStyle.aspx).
Ceev And Bolts
Pib thiab kev nrhiav ib tug los ntawm as per rau cov ntaub ntawv MSDN thiab Heather tus Xatau-ntoos lub Tshooj tsib.
Thaum no tus taw tes, koj twb ua ntxiv koj CQWP mus rau sab thiab koj muaj koj <CommonViewFields> configured li tsim nyog.
Raws li cov kauj ruam li ib txwm, Kuv txais tau kev kuaj intermediate:
1. Tsim ib cov hom, templatized kev cai sau ntawd cov hom thiab ob qhov chaw. Ntawm no yog cov hom:
Ntawm no yog qhov chaw qauv:
2. Ntxiv rau qhov CQWP tom qab tsim kuv ib qhov subsites thiab singleton yog ib qhov kev npe:
3. Ntxiv tag nrho cov ntxiv kuv xav tau ntawm cov <CommonViewFields>:
<khoom lub npe="CommonViewFields" hom="hlua">Project_x0020_Name;Project_x0020_Expenses;Project_x0020_Status;Project_x0020_Start_x0020_Date;Project_x0020_End_x0020_Date;Project_x0020_Budget</khoom>
Ceeb toom tias kuv tau ua kom tag nrho cov cuab yeej teb ntawm ib tug kab los nws yuav tsis ua hauj lwm (CQWP xav qhia kuv tias cov lus nug rov qab tsis khoom).
4. Thaum no tus taw tes, mov kom dhau MSDN tsab xov xwm thiab flip ntawm nyob rau tshooj Heather tus Xatau-ntoos lub. Ua raws li nws cov kauj ruam pib ze rau ruam #5 los ua ib customized / unghosted version of ItemStyle.xsl. Kuv ua raws li cov lus qhia txog tus Heather, saum ntawm cov kauj ruam 11 thiab tau kuaj intermediate:
4.1: Kuv tus XSL template npe raws li nram no:
<xsl:Template npe = "daim phiaj" phim = "tshais[@Style = 'Daim phiaj']" hom = "itemstyle">
Kuv yuav ib nyuag kuj hloov nws pom tias <xsl:rau-ib …> yog muab ib <br /> lossis mus muab tov:
<xsl:rau-ib xaiv="@*"> P:<xsl:tus nqi-ntawm xaiv="lub npe()" /><br/> </xsl:rau-ib>
4.2: Kuv hloov hauv cov qhov Web site, mus zoo li thiab xaiv daim kuv "phiaj" style:
Ntawm no yog cov siv qhov kev hloov thiab kev pab:
Peb pom tau ntawm qhov saum no uas teb peb xav (Peb tes num lub npe, nqi, xwm txheej, yam) yog muaj nyob rau peb siv thaum peb emit cov HTML. Tsis tas li ntawd, peb pom cov npe uas peb yuav tsum reference cov txhua hauv lub XSL. Piv txwv, peb reference Project txheej xwm li "Project_x005F_x0020_Name".
Thaum no tus taw tes, peb ncaim ntawm Heather tus blog thiab ntawm lub lub xub pwg nyom ntawm no giants, Kuv tus kheej lub ntsis ntxiv kuv.
ContentQueryMain.xsl
CEEB TOOM: Thaum muaj kev hloov rau ob ContentQueryMain.xsl li no ItemStyle.xsl, koj yuav tau xyuas cov ntaub ntawv qaum rau ua ntej koj mus ntsib cov nyhuv koj hloov.
Mus rau daim phiaj vaj, NTXHUAB siv ob yam XSL ntaub ntawv los ua cov ntsiab peb pom los ntawm ib tug CQWP. Meskas tus me ntsis dhau los tso zis ntau lawm, peb hloov ItemStyle.xsl. NTXHUAB yeej siv lwm daim ntawv XSL, ContentQueryMain.xsl yuav nyob tau nrog ItemStyle.xsl Meskas cov HTML. Raws li implies lub npe, ContentQueryMain.xsl yog "loj lub" XSL controls qhov txaus zuag qhia tag nrho cov neeg txhais lus. Nws iterates kev los ntawm tag nrho cov kabmob khoom thiab kis tau ib tug los ntawm ib tug mus templates hauv ItemStyle.xsl. Peb mam li hloov ItemStyle.xsl Meskas tus qhib <cov lus> lossis ua ntej emitting rau thawj kab ntawv thiab kaw <cov lus> lossis tom qab emitting rau kab kawg. Yuav ua kom tiav no, ContentQueryMain.xsl hloov mus rau kis ob tug tsis tau rau daim peb "phiaj" Template hauv ItemStyle.xsl, "lub xeem leej" thiab "leej tam sim no". ItemStyle.xsl siv no rau conditionally emit tus cim npe tsim nyog.
Siv cov txheej txheem Heather tus Xatau-ntoos lub, Peb nrhiav ContentQueryMain.xsl. Nws nyob hauv qhov chaw qub li ItemStyle.xsl. Qhov tshuaj ntsuam txhaj yuav pab:
Peb yuav tau ua cov nram qab no hloov:
- Hloov ib tus xsl template, "CallItemTemplate" uas tau invokes peb daim phiaj template hauv ItemStyle.xsl. Peb yuav kis tau ob tsis mus rau daim phiaj template kom nws yuav muaj cov ntaub ntawv uas nws xav kom neeg conditionally qhib thiab kaw <cov lus> cim npe.
- Hloov dua me ntsis uas hu ua "CallItemTemplate lub ContentQueryMain.xsl" yuav kis tau "LastRow ib" parameter kom cov LastRow uas tau kis rau peb cov template daim phiaj.
Nrhiav tus template npe hu ua "OuterTemplate.CallItemTemplate" qhia los ntawm cov hlua:
<xsl:Template lub npe="OuterTemplate.CallItemTemplate">
Tag nrho cov template hloov raws li nram no:
<xsl:Template lub npe="OuterTemplate.CallItemTemplate"> <xsl:param lub npe="CurPosition" /> <!-- Ntxiv "LastRow cov" parameter. Peb tsuas siv cov khoom style pass hauv yog "Daim phiaj". --> <xsl:param lub npe="LastRow" /> <xsl:xaiv> <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsRollUpItem'"> <xsl:thov templates xaiv="." hom="itemstyle"> <xsl:nrog param lub npe="EditMode" xaiv="$cbq_iseditmode" /> </xsl:thov templates> </xsl:Thauj tw> <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsBigItem'"> <xsl:thov templates xaiv="." hom="itemstyle"> <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" /> </xsl:thov templates> </xsl:Thauj tw> <xsl:Thauj tw ntsuam xyuas="@Style = 'NewsCategoryItem'"> <xsl:thov templates xaiv="." hom="itemstyle"> <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" /> </xsl:thov templates> </xsl:Thauj tw> <!-- Tshaj xav tam sim no thiab cov lastrow rau ntawm daim phiaj itemstyle.xsl template. ItemStyle.xsl yuav siv uas emit rau txoj kev qhib thiab kaw <cov lus> cim npe. --> <xsl:Thauj tw ntsuam xyuas="@Style = 'Daim phiaj'"> <xsl:thov templates xaiv="." hom="itemstyle"> <xsl:nrog param lub npe="CurPos" xaiv="$CurPosition" /> <xsl:nrog param lub npe="Kav" xaiv="$LastRow" /> </xsl:thov templates> </xsl:Thauj tw> <xsl:txwv tsis pub> <xsl:thov templates xaiv="." hom="itemstyle"> </xsl:thov templates> </xsl:txwv tsis pub> </xsl:xaiv> </xsl:Template> |
Cov lus qhia txog lub hom phiaj ntawm qhov kev hloov.
tau mas, "OuterTemplate.CallItemTemplate cov" nws tus kheej yog hu los ntawm lwm template. Nrhiav tus template ntawm searching rau qhov ntawv txoj hlua:
<xsl:Template lub npe="OuterTemplate.Body">
Scroll los ntawm cov lus qhia nyob rau hauv OuterTemplate.Body thiab cov LastRow parameter ntxig raws li nram no (qhia raws li ib tug saib nyob rau hauv italics):
<xsl:hu-template lub npe="OuterTemplate.CallItemTemplate"> <xsl:nrog param lub npe="CurPosition" xaiv="$CurPosition" /> <!-- Ntxig rau LastRow parameter. --> <xsl:nrog param lub npe="LastRow" xaiv="$LastRow"/> </xsl:hu-template>
Tom qab nov tag nrho, peb thaum kawg muaj yam teeb zoo zoo kom peb cov ItemStyle.xsl muaj emit <cov lus> cim npe rau qhov chaw uas koj txoj kev.
ItemStyle.Xsl
CEEB TOOM: Dua, nyob ItemStyle.xsl kos tom qab hloov yam koj pom cov nyhuv uas cov kev pauv.
Peb muaj tus ob tug paub tab ntawm no:
- Hloov hauv koj daim phiaj template. Koj tau daim ntawv/muab tshuaj txhuam hauv qab no txij.
- Ntxiv ib co mumbo jumbo sab nraud lub ntsiab template txhais tias enables "formatcurrency" Template mus ua hauj lwm. (Koj yuav qhia tau tias kuv muaj ib cov neeg kov tenuous XSL).
Ua ntej, ze rau saum ItemStyle.xsl, ntxiv cov kab no:
<!-- Tej mumbo jumbo uas peb tso saib tuaj enables. txiaj. --> <xsl:hom zauv lub npe="cov neeg ua haujlwm" ntiv="D" /> <xsl:Template lub npe="Neej ntawd" phim="*" hom="itemstyle">
Faj seeb txog tias kuv ntxiv tias yuav ua ntej mus ncaj rau <xsl:Template npe = "Default" …> txhais.
Tom ntej, rov qab mus saib peb daim phiaj template. Menyuam mos liab cov daim phiaj template sim cov cai nram qab no. Nws yog muab commented, tab sis tsis txhob yig email rau kuv los sis tawm lus rau kuv blog yog hais tias koj muaj lus nug.
<xsl:Template lub npe="Daim phiaj" phim="Tshais[@Style = 'Daim phiaj']" hom="itemstyle"> <!-- ContentMain.xsl kis tau CurPos thiab xeem. Peb siv cov no los conditionally emit rau txoj kev qhib thiab kaw <cov lus> cim npe. --> <xsl:param lub npe="CurPos" /> <xsl:param lub npe="Kav" /> <!-- Cov tsiaj ntawv nram qab no yog los ntawm tus txheem ItemStyle.xsl unmodified --> <xsl:kuj sib txawv thiab lub npe="SafeImageUrl"> <xsl:hu-template lub npe="OuterTemplate.GetSafeStaticUrl"> <xsl:nrog param lub npe="UrlColumnName" xaiv="'ImageUrl'"/> </xsl:hu-template> </xsl:kuj sib txawv thiab> <xsl:kuj sib txawv thiab lub npe="SafeLinkUrl"> <xsl:hu-template lub npe="OuterTemplate.GetSafeLink"> <xsl:nrog param lub npe="UrlColumnName" xaiv="'LinkUrl'"/> </xsl:hu-template> </xsl:kuj sib txawv thiab> <xsl:kuj sib txawv thiab lub npe="DisplayTitle"> <xsl:hu-template lub npe="OuterTemplate.GetTitle"> <xsl:nrog param lub npe="Npe" xaiv="@Title"/> <xsl:nrog param lub npe="UrlColumnName" xaiv="'LinkUrl'"/> </xsl:hu-template> </xsl:kuj sib txawv thiab> <xsl:kuj sib txawv thiab lub npe="LinkTarget"> <xsl:Yog hais tias ntsuam xyuas="@OpenInNewWindow = 'Tseeb'" >_blank</xsl:Yog hais tias> </xsl:kuj sib txawv thiab> <!-- Ntawm no peb txhais ib kuj sib txawv thiab, "tableStart". Qhov no muaj cov HTML uas peb siv txhais cov lus qhib cov qhov rooj li no rau cov ntawv qhia kiag. Nco ntsoov tias CurPos = 1, nws nrog cov HTML rau ib CDATA lossis. Txwv tsis pub, nws yuav tau npliag. Cov nqi no tableStart no emited txhua zaus ItemStyle hu ua ntawm ContentQueryMain.xsl. --> <xsl:kuj sib txawv thiab lub npe="tableStart"> <xsl:Yog hais tias ntsuam xyuas="$CurPos = 1"> <![CDATA[ <ciam teb lus = 1> <tr bgcolor = "ntsuab"> <Td><xim Font = "dawb"><b>Qhov project Name</b></Font></Td> <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Sau rau hnub tim</b></Font></Td> <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Nyiaj txiag</b></Font></Td> <Td dlhos = "txoj cai"><xim Font = "dawb"><b>Cov nqi</b></Font></Td> <Td><xim Font = "dawb"><b>Zuag qhia tag nrho cov txheej xwm</b></Font></Td> </tr> ]]> </xsl:Yog hais tias> </xsl:kuj sib txawv thiab> <!-- Kuj sib txawv thiab lwm, tableEnd cias nyiaj thiab lub sij lub kaw lus lossis. Raws li nrog tableStart, Nws yog emited. Qhov no yog vim li cas nws tus nqi yog raug conditionally based raws li qhov seb peb twb tau mus rau kab kawg ntawm ContentQueryMain.xsl. --> <xsl:kuj sib txawv thiab lub npe="tableEnd"> <xsl:Yog hais tias ntsuam xyuas="$CurPos = $Last"> <![CDATA[ </cov lus> ]]> </xsl:Yog hais tias> </xsl:kuj sib txawv thiab> <!-- Nco ntsoov emit tus txheem ntawm tableStart. Yog hais tias qhov no yuav tsis tau rau thawj kab dhau rau peb ntawm ContentQueryMain.xsl, ces peb paub nws tus nqi yuav dawb paug. Lov tes taw tso zis ntau escaping vim hais tias thaum twg tableStart nws tsis dawb paug, nws muaj xws li cov HTML uas peb xav tau nws los ntawm qhov browser. Yog peb tsis txhob hais XSL parser los lov tes taw rau cov zis escaping, nws yuav ua kom muaj khoom xws li"<cov lus>" hloov ntawm"<cov lus>". --> <xsl:tus nqi-ntawm xaiv="$tableStart" lov tes taw-zis-escaping="yog"/> <tr> <!-- P:Project_x005F_x0020_Name P:Project_x005F_x0020_End_x005F_x0020_Date P:Project_x005F_x0020_Budget P:Project_x005F_x0020_Expenses P:Project_x005F_x0020_Status --> <Td> <xsl:tus nqi-ntawm xaiv="@Project_x005F_x0020_Name"/> </Td> <Td dlhos="txoj cai"> <xsl:tus nqi-ntawm xaiv="@Project_x005F_x0020_End_x005F_x0020_Date"/> </Td> <Td dlhos="txoj cai"> <xsl:hu-template lub npe="formatcurrency"> <xsl:nrog param lub npe="tus nqi" |
Qhov no nws kuj pab tau incredibly. Ua tsaug!
Aah… yog vim kuv cov Style sau npe txawv ib tug thiab tsis realise nug tias nyob hauv lub ContentQueryMain.xsl nws saib rau qhov "style":
<xsl:Thaum test="@Style='NameOfMyStyle'">
Cov uas renamed nws haujlwm. 🙂
Nws yuav luag ua hauj lwm rau kuv: Kuv tswj rau output cov </cov lus> xaus lossis kom raug, tab sis, yog tus lossis starting uas ploj lawm. No mas, qhov kev kuaj ntawd = "$CurPos = 1" tsis rov muaj tseeb. Tab sis vim li cas?
Yawm ncej. Kuv tau ua tag nrho cov saum no tej Paul. Kuv muaj ib cov lus nug, cas yuav achive kuv qhov tawm ntawm cov "tag nrho cov Expences" los yog tawm ntawm cov nqi ntawm txhua ob.
Koj tau ua haujlwm uas tsim cov ntaub kev cai ContentQueryMain thiab cov ItemStyle xsl ntawv? Yog vim li cas kuv hais yog tias kuv tsis xav yuav txhawj txog kuv kev cai yeej overwritten tej thaj ua rau thaj los hloov khoom dua tshiab. Koj tsis muaj piv txwv? Kuv twb sim ua ib daim ntawv zoo tib yam rau ContentQueryMain.xsl thiab uploading ntawd daim ntawv kev cai tshiab rau lub tsev qiv ntawv Style. Thaum muab tus siv rau tej ntaub ntawv no xsl tus .webpart MainXslLink cuab yeej, Kuv tau 401 tsis tso cai. Tej ntaub ntawv rau kev cai xsl yog ib cov published version thiab sawv daws tau nyeem ntawv rau nws.
zoo heev ncej tsaug! Muaj lawm battling nrog no tam sim no tau ob peb hnub kawg.
nyob zoo, qhov no yog ib cov tswv yeej posting. Kuv xav tias txhua yam ua hauj lwm, thiab xim raws kuj Mike av ntawd hloov ces nws pawg
soj ntsuam sab hauv lub qhov rooj los Xijpeem kuv xaiv raws li cov pab pawg neeg los parameter hauv qhov CQWB zog.
Kuv muab lub npe ib qhov txuas kuj, yog li ntawd xwb nicely. Kuv tseem muaj ib qho teeb meem, ho. Kuv tabtom grouping soj ntsuam los ntawm qhov chaw lub npe. Hauv lub rooj, nws pawg tau nicely, thiab nws zoo li yawm suab, tiam sis nws tseem printing tawm rau txhua tus neeg
npe(hauv kuv tsev neeg cov kev kawm ntawv npe) saum toj rooj. Leej twg puas paub tua no?
Tsaug,
Greg
Tshooj zoo. Kuv muab kuv cov lus zoo tus cov neej ntawd Sharepoint teev ntawm cais qhov chaws ntawm daim ntawv tswj. Ntawm no yog cov ntsiab HTML blocks ntxiv kom haum nyob rau hauv ItemStyle:
<ROOJ dav = "100%" hoob = "ms-listviewtable" ciam teb = 0 cellspacing = 0 cellpadding = 1 dir = "None">
<!–HEADER–>
<Cov chav kawm TR = "ms-viewheadertr" VALIGN = TOP>
<TH nowrap tau = "col" hoob = "ms-vh2"><div style = "dav:100%;txoj hauj lwm:tus kwv tij;sab laug:0;saum:0;">
<ROOJ style = "dav:100%;" CtxNum = "1" qhov siab = "100%" cellspacing = 1 cellpadding = 0 hoob = "ms-unselectedtitle">
<TR>
<TD dav = "100%" Hoob = "ms-vb" nowrap>
Texte du titre ici
</TD>
<TD style = "txoj hauj lwm:tsis;">
</TD>
</TR>
</COV LUS></div>
</TH>
<!–Rov ua rau tag nrho cov header hlwb–>
</TR>
<!– Cov ntaub ntawv los ntawm lub rooj –>
<Cov chav kawm TR = "">
<!–Cov ntaub ntawv qhia kiag, siv Paul txoj cai rau ib tug thawj uas tus hyperlink –>
<TD hoob = "ms-vb2">Cov ntaub ntawv ntawm no</TD>
<!–Kem npliag–>
<TD hoob = "ms-vb2">
<ntsua kev dir = All></ntsua kev><
/TD>
<!–Hnub tim sab–>
<TD hoob = "ms-vb2">
<NOBR>11/12/2008</NOBR>
</TD>
</TR>
<!–***Lwm leej – Siv kuj sib txawv ib tug tshiab XSL thiab uas yuav ntxig rau lwm hoob kawm raws li qhov tam sim no leej modulo 2–>
<Cov chav kawm TR = "ms-alternating">
…
</TR>
</COV LUS>
Thatz precisely kuv twb nrhiav thiaj liKoj rock txiv neej thiaj liNtev nyob.Hlub koj rau tus ncej..
<xsl:thov templates xaiv = "." hom = "itemstyle">
<xsl:nrog param name = "CurPos" xaiv = "$CurPosition" />
<xsl:nrog param name = "kav" xaiv = "$LastRow" />
<xsl:nrog param name = "StartNewGroup" select="@__begingroup" />
</xsl:Thauj tw>
<xsl:Thaum kuaj = "$StartNewGroup = 'Tseeb'">
<tr>
<Td >
<xsl:hu-template name="OuterTemplate.GetGroupName">
<xsl:nrog param name = "GroupName" select="@*[lub npe()= $Group]"/>
<xsl:nrog param name = "GroupType" xaiv = "$GroupType" />
</xsl:hu-template>
</Td>
</tr>
</xsl:Thauj tw>
<xsl:txwv tsis pub>
</xsl:txwv tsis pub>
</xsl:xaiv>
Kuv tuaj los pov,
Thaum ua hauj lwm nrog cov qhov Web site xml/xsl thiab cov lus nug lawm, koj yuav nrhiav tau ib co kev zoo los format koj xslt? Tseeb sim hloov thiab ntsuam xyuas txoj tsim yog tiag ib txoj kev mob hauv qhov ib ** nyuam qhuav uas siv ib phau ntawv editor…
Txhua yam zoo
(e.g. https://myweb.com/Marketing/images/icn-order.gif, )
Kuv yuav tsum tau siv duab los yog daim duab nyob hauv CommonViewFields teb seb? (e.g. InternalColumnName, Duab)
Koj cov ncej yog raws nraim li kuv twb nrhiav. Txawm li cas los, Kuv tsis tau mus ua hauj lwm.
Kuv muaj cov ntaub ntawv uas muab cia rau hauv ntau doc. qiv tab sis dej num uas siv ib tug kev cai kawm sab (xaiv: 1 los sis 2. Kuv xav siv CQWP los qhia cov ntawv nyob rau cov hoob kawm.
Kuv twb tau mus ntxiv rau lub CQWP, export mus SPD, configure lub itemStyle.xls qhia kev cai fileds nyob rau hauv daim ntawv teev saib. Txawm li cas los, Kuv yuav tsis ntse kev li koj piav nov.
Cov no yog txhua qhov kuv xav kom koj qhia rau kuv CQWP:
Cov hom ntaub ntawv (qhia icon)
Cov ntaub ntawv npe
Hnub kawg hloov
Hloov los ntawm leej twg
Xyuas kom
Tshawb xyuas hauv Comments
Kuv muaj cov nyob rau hauv ib daim ntawv teev hom. Cas kuv yuav hloov nws mus rau ib lub hom talble.
Tsaug.
Saji
Thov txim rau cov missspelling rau kuv lub npe tsis yog tseeb qhov twg qhov ” tuaj ntawm.