Hello. I'm trying to figure out how I can make a DVWP with an optional WebURL parameter.
I want it so if the user provides it in the Parameters Editor then the DVWP will use it, otherwise it will use the current site. I thought I could use {sitecollectionroot} like below but that doesn't work on subsites so if the DVWP is in a sub-site page and the user doesn't provide a WebURL in Parameters Editor it will look for the list in the parent site because {sitecollectionroot} defaults to the parent site.
<WebPartPages:DataFormParameter Name="WebURL" ParameterKey="WebURL" PropertyName="ParameterValues" DefaultValue="{sitecollectionroot}" />