Tapaidh agus éasca: Leabú hipearnasc isteach sonraí fhonn gréasáin mar chuid XSLT

Suas chun dáta (01/17/08): Seo cainteanna iontráil blag faoi níos mó hyperlink XSL maitheas: http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/rewriting-links-in-search-results-xslt.

Forbhreathnú agus Cuspóir: I had created a simple bar chart to serve as component on a dashboard. I’ll save the details on building charts for another post, ach ní raibh mé invent an teicníc (ná an comhartha ceiste, an ní sin). It turned out there was a bug in the chart and while I fixed that, I took the opportunity to convert some labels into hyperlinks that pointed at the underlying list behind the graph. Mar shampla, there is a label with value "Hold". I wanted to turn the label into a hyperlink so that the user could click on it and drill down to the specific entries in the list whose status value is "Hold".

Céimeanna:

  1. Bain úsáid as stiúideo amhairc le haghaidh IntelliSense SharePoint-eolas.
  2. Cóipeáil XSLT an DVWP ar isteach amhairc stiúideo (tionscadal bán a chruthú, comhad XSL a chur leis an tionscadal).
  3. Cóipeáil an nasc mian leat a úsáid i an gearrthaisce.
  4. Greamaigh sé isteach ar an suíomh gceart sin sa XSL.
  5. Convert URL argument separators on the query string from "&" to "&Dodgers;"
  6. Url-ionchódú argóintí aonair.
  7. Wrap go taobh istigh d' <a href…> </a>

Sampla:

Tá mé URL:

http://[freastalaí]/[suíomh]/Liostaí / Oscailte 20Positions/AllItems.aspx%?Féach ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = hearcóir&FilterValue1 = Hold

Liom a thiontú sé isteach:

     <a href="Liostaí / Oscailte 20Positions/AllItems.aspx%?Féach =% 7b84EEA2F5-121B-40B7-946F-
0FA704A1DAA1% 7d&Dodgers;FilterField1 = hearcóir&Dodgers;FilterValue1 = Hold"> Coinnigh: </a>

Mé a chlaochlú de láimh an chéad argóint ó:

{84EEA2F5-121B-40B7-946F-0FA704A1DAA1}

go:

%7b84EEA2F5-121B-40B7-946F-0FA704A1DAA1% 7d

(Sa, Athraíonn an brace ar oscailt do% 7b agus transforms an brace deiridh chun% 7d)

An dara agus an tríú argóintí’ paraiméadair ("FilterField1=Hearcóir" and "FilterValue1=Coinnigh" faoi ​​seach) nach gá a bheith url-ionchódaithe mar nach bhfuil siad go bhfuil aon carachtair neamhshábháilte.

Nótaí:

Ba chóir an teicníc obair go ginearálta in áit ar bith is mian leat a hyperlink in XSLT ina n-áirítear an hyperlink paraiméadair ar an URL, mar shampla a leabú:

http://[freastalaí]/[suíomh]/Liostaí / Oscailte 20Positions/AllItems.aspx%?Féach ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = hearcóir&FilterValue1 = Hold

Fuair ​​mé an URL féin trí rochtain a fháil ar an liosta saincheaptha agus de láimh scagadh ar an gcolún ar stádas (labeled "Recruiter" thuas).

6 smaointe ar "Tapaidh agus éasca: Leabú hipearnasc isteach sonraí fhonn gréasáin mar chuid XSLT

  1. Paul Galvin

    Cristina, that 84EE.. is a GUID that uniquely identifies the list internally. You can get it by pulling up the view in your browser and inspecting the URL of your browser.

    Freagra
  2. Cristina Perez Otaiza

    where or how do generate this code ’84EEA2F5-121B-40B7-946F-0FA704A1DAA1′

    Could be possible to do this …&FilterField1=Recruiter Center &FilterValue1=Hold CE / ASM?


    Do i need to remove the spaces between them?

    Freagra
  3. Eric Anderson
    An bhfuil aon mholtaí le haghaidh an staid tú áit ar mhaith leat chun pas a fháil sonraí ó liosta SharePoint mar luach FilterValue1, agus nuair is féidir an luach sa cholún rud ampersands? (Tá mé iarracht go leor bealaí a ionchódú / éalú an luach, ach ní mé tar éis a lán de luck i rith sé i gceart.)
    Freagra
  4. Costas Tsaklas
    I saw the example at the Help Desk application in the ‘fab 40’. The problem I don’t know how it was generated and that’s why I’m looking forward to the steps on how to do it
    Freagra
  5. Paul Galvin
    Ní raibh mé invent é, ach tá sé aisteach conas deacair é a fháil.
    I came across a functional example of this I think from one of the "fab 40" teimpléid.
    It’s data view web part with XSLT that generates a graph. I definitely plan to do a post on it.
    Freagra
  6. Costas Tsaklas
    I’m looking forward to the post about creating a chart. I have been looking for information on how to create charts based on lists (e.g oscailte, ceisteanna dúnta, Céatadáin etc.) and I can’t find any. Go raibh maith agat
    Freagra

Leave a Reply

Ní thabharfar do sheoladh r-phoist a fhoilsiú. Réimsí riachtanacha atá marcáilte *