Solved

SharePoint 2010 Dynamic WebPart Title

Posted on 2010-11-08
3
1,587 Views
Last Modified: 2012-06-27
I have a requirement to add a date\time to a webpart title with a SharePoint site. The source of the date is contained in a sql table (e.g. process date) . Whats the easiest way? CEWP?
0
Comment
Question by:bon733
  • 2
3 Comments
 
LVL 8

Expert Comment

by:static-void
Comment Utility
Is the webpart you want to change the title for a webpart of your own (if so i would set the title in the constructor of the part)

If not you can use the LimitedWebPartManager to retrieve a collection of webparts for a given SP page (url) and from there you can manually set the title.
0
 

Author Comment

by:bon733
Comment Utility
The web parts in question are generated by DashBoard Designer to a Dashboard page. I was hoping to use javascript and a CEWP to cycle through the titles on the page and just append a date time to them. It seems very simple, but getting the script to cycle through all of the Titles is difficult. I will take a look at the LimitedWebPartManager object and see the options.
0
 
LVL 8

Accepted Solution

by:
static-void earned 500 total points
Comment Utility
$('.ms-WPTitle span')[0].InnerHtml('fdfsfsdfsdf');

something like that?
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now