How to display dynamic msg on SP2010 page
Posted on 2014-01-08
I am looking for a way to have a dynamic msg display in its own Content section on a page in a Sharepoint 2010 site.
Currently, I have a page with a Content section and a Quest webpart. The content section has a table with multiple hyperlinks and once a hyperlink has been clicked, the Quest
webpart will display a table of contacts from an SP list based on a parameter in the hyperlink.
Links in the table in Top Content section:
Link 1: /Communications/Contacts/Pages/Contacts.aspx?Area=DCP
Link 2: /Communications/Contacts/Pages/Contacts.aspx?Area=FTS
CAML Filter in Quest Webpart:
<FieldRef Name="Area" />
<Value Type="Choice" Source="HttpParameter" SourceName="Area" />
Result from clicking on the first link:
The Quest webpart is configured to display several fields from a contacts list in SP. By clicking on the first link in the example, all records from the Contacts list that have the value of "DCP" in the Area field will be displayed in the Quest listview webpart.
To also let the user know which area's contacts are being displayed.
Without impacting the current setup, I would like to have a dynamic msg inserted in its own content section between the top content section and the webpart. This new content section would potentially have some script that dynamically displays a msg based on the area's contacts being displayed, by making use of the html parameter in the link. Something like "The list of contacts from the <Area> area is displayed below" where <Area> is replaced with the HttpParameter value from the link in the table.
I realize I could accomplish this by creating a different page for each link(area) and then configuring its webpart title accordingly but I would have a dozen pages to start and more in the future. Undesirable.