Using ModifyXsltArgumentList(..)

Aug 8, 2007 at 12:23 PM
Hi!

I can't seem to find any useful information on how I can change the arguments passed to the XSL, however I do think that the abovementioned method is the I'm supposed to use..

I was hoping you or someone else on here could help me out? Would appreciate it.
Aug 9, 2007 at 6:56 AM
All right, it suddenly hit my yesterday evening, not really that hard to figure out.

Well, the solution is to override the mentioned function, and for example to add a parameter, you could do like this:

protected override void ModifyXsltArgumentList(ArgumentClassWrapper argList) {
base.ModifyXsltArgumentList(argList);
argList.AddParameter("ParamName", "", "ParamValue"); // I don't know if a better "NameSpace" should be given, but this at least works..
}

Now you could add the new parameter to the near top of your ContentQueryMain.xsl and it is available in the XSL.

Could come on handy for some, did for me! :)
Oct 19, 2007 at 3:18 PM
I wonder if this would get me closer to allowing a connection to another web part? I want to filter by a value from another part or a url parm. Any ideas?

/bac


developerx wrote:
All right, it suddenly hit my yesterday evening, not really that hard to figure out.

Well, the solution is to override the mentioned function, and for example to add a parameter, you could do like this:

protected override void ModifyXsltArgumentList(ArgumentClassWrapper argList) {
base.ModifyXsltArgumentList(argList);
argList.AddParameter("ParamName", "", "ParamValue"); // I don't know if a better "NameSpace" should be given, but this at least works..
}

Now you could add the new parameter to the near top of your ContentQueryMain.xsl and it is available in the XSL.

Could come on handy for some, did for me! :)