- Insert a field from any list as a single item dataview, doesn't matter which list or which field, into your page. We'll say you're using 'Title'
- Create a Parameter on that view of Parameter Type 'Server Variable' and set the Server Variable Name to the name of the variable you want to use (e.g. LOGON_VARIABLE for the username of the logged on user.
- In the page select the dataview you created then go to the Code view (or code pane in Split view). look for a line that contains an at symbgol followd by the name of the field you chose. If you used the title field it would look something like:
<xsl:value-of select="@Title" /> - Replace the @ with a $ and the field name with the name of the parameter. If the parameter name is Param1 the line will now look like:
<xsl:value-of select="$Param1" /> - Save the page and view it in your browser, it should show your username.
Now looking after a Sharepoint site so here are my trials and tribulations in this new assignment.
Thursday, 9 December 2010
Displaying Server Parameters
My colleague discovered how to display a server variable (e.g. the logged on user) on a page:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment