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:
- Bain úsáid as stiúideo amhairc le haghaidh IntelliSense SharePoint-eolas.
- Cóipeáil XSLT an DVWP ar isteach amhairc stiúideo (tionscadal bán a chruthú, comhad XSL a chur leis an tionscadal).
- Cóipeáil an nasc mian leat a úsáid i an gearrthaisce.
- Greamaigh sé isteach ar an suíomh gceart sin sa XSL.
- Convert URL argument separators on the query string from "&" to "&Dodgers;"
- Url-ionchódú argóintí aonair.
- 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).