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:
- Użu studio viżwali għal Sharepoint-konxji IntelliSense.
- Kopja XSLT l DVWP tal fis viżwali istudjo (jinħoloq proġett vojt, żid fajl XSL għall-proġett).
- Ikkopja l-link li trid tuża fil-clipboard.
- Paste fil-post dritt fil-XSL.
- Ikkonverti separaturi argument URL fuq il-sekwenza mistoqsija minn "&" għal "&"
- Url-encode argumenti individwali.
- 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&FilterField1 = Recruiter&= 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).
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.
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?