Quick u faċli: Embed hyperlink fis-dejta parti fehma XSLT web

UPDATE (01/17/08): Dan taħdidiet dħul blog dwar goodness hyperlink aktar XSL: http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/rewriting-links-in-search-results-xslt.

Ħarsa ġenerali u Objettiv: 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, imma jien ma nivvintaw dan it-teknika (u lanqas il-kwistjoni mark, għal dik il-kwistjoni). 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. Per eżempju, 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".

Passi:

  1. Użu studio viżwali għal Sharepoint-konxji IntelliSense.
  2. Kopja XSLT l DVWP tal fis viżwali istudjo (jinħoloq proġett vojt, żid fajl XSL għall-proġett).
  3. Ikkopja l-link li trid tuża fil-clipboard.
  4. Paste fil-post dritt fil-XSL.
  5. Ikkonverti separaturi argument URL fuq il-sekwenza mistoqsija minn "&" għal "&"
  6. Url-encode argumenti individwali.
  7. Kebbeb li ġewwa <a href…> </a>

Eżempju:

I jkollhom URL:

http://[server]/[sit]/Listi / 20Positions/AllItems.aspx Open%?View ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = Recruiter&= FilterValue1 Żomm

I jissarfu fi:

     <a href="Listi / 20Positions/AllItems.aspx Open%?View =% 7b84EEA2F5-121B-40B7-946F-
0FA704A1DAA1% 7d&amp;FilterField1 = Recruiter&amp;= FilterValue1 Żomm"> Żomm: </a>

Għandi manwalment trasformati l-ewwel argument minn:

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

li:

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

(F'din, l-Brace miftuħa tittrasforma lill 7b% u l-Brace għeluq tittrasforma sa 7d%)

L-argumenti tieni u tielet’ parametri ("FilterField1 =Recruiter" u "FilterValue1 =Żomm" rispettivament) m'għandhomx bżonn li jiġu url 'encoded għaliex dawn ma jkunx fihom xi karattri mhux sikuri.

Noti:

Din it-teknika għandha ġeneralment jaħdmu kullimkien inti tixtieq li ssodata hyperlink fil XSLT fejn il-hyperlink jinkludi parametri fuq il-URL bħal:

http://[server]/[sit]/Listi / 20Positions/AllItems.aspx Open%?View ={84EEA2F5-121B-40B7-946F-0FA704A1DAA1}&FilterField1 = Recruiter&= FilterValue1 Żomm

Sibt l-URL innifsu billi taċċessa l-lista tad-dwana u manwalment filtrazzjoni fuq il-kolonna istatus (ittikjati "Recruiter" hawn fuq).

6 ħsibijiet dwar "Quick u faċli: Embed hyperlink fis-dejta parti fehma XSLT web

  1. Paul Galvin

    Cristina, li 84EE.. huwa GUID li jidentifika b'mod uniku il-lista internament. Tista 'tikseb dan billi jinġibdu sal-fehma fil-browser tiegħek u jispezzjona l-URL tal-browser tiegħek.

  2. Cristina Perez Otaiza

    fejn jew kif do jiġġeneraw dan il-kodiċi '84EEA2F5-121B-40B7-946F-0FA704A1DAA1′

    Jista 'jkun possibbli li jsir dan …&FilterField1 = Recruiter Center &= FilterValue1 Żomm CE / ASM?

    Jew
    Do i bżonn li jitneħħew l-ispazji ta 'bejniethom?

  3. Eric Anderson
    Għandek xi suġġerimenti għal sitwazzjoni fejn inti tixtieq li jgħaddu data minn lista SharePoint bħala l-valur FilterValue1, u fejn il-valur fil-kolonna jista 'jkun fihom ampersands? (Stajt ppruvaw bosta modi biex jikkodifikaw / jaħarbu l-valur, iżda am mhux li ħafna ta 'xortih fil-mogħdija kif suppost.)
  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
  5. Paul Galvin
    I ma nivvintaw dan, iżda huwa stramba kemm hu diffiċli li ssib.
    I came across a functional example of this I think from one of the "fab 40" templates.
    It’s data view web part with XSLT that generates a graph. I definitely plan to do a post on it.
  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 miftuħa, kwistjonijiet magħluqa, Perċentwali eċċ.) and I can’t find any. Grazzi

Ħalli Irrispondi

Your email address mhux se jkun ippubblikat. Meħtieġa oqsma huma mmarkati *