开发者

How to WelCome control in Webpart code?

I need to place a webpart on the page. The webpart need to change Welcome control title. I need to change "WelCome UserName" to "UserName".

I tried http://www.wictorwilen.开发者_开发知识库se/Post/Having-fun-with-the-SharePoint-Welcomeascx-control.aspx , But it did not worked in Webpart. If anybody have idea to change this control. Please share with me.


That article is a pretty comprehensive walkthrough of one way to do this - perhaps your focus should be to determine where you have gone wrong in the implementation of it?

An alternative (hacky) method would be to put some javscript into the page using a CEWP or modifying the master page that will search for the welcome string and remove it.

Hint - don't search for "Welcome", search for its container which looks a little like this (some attributes stripped out for clarity

<span title="Open Menu">
    <div id="zz7_Menu_t" ... 
         class="ms-SPLink ms-SpLinkButtonInActive" >
        <a accesskey="L" id="zz7_Menu" ... href="#" serverclientid="zz7_Menu" 
           menutokenvalues="MENUCLIENTID=zz7_Menu,
                            TEMPLATECLIENTID=zz3_ID_PersonalActionMenu">
            Welcome UserName
        </a>
    </div>
</span>

Some links to get you started

http://www.dlocc.com/articles/style-a-page-using-the-content-editor-web-part-and-css/

http://www.cleverworkarounds.com/2008/02/28/more-sharepoint-branding-customisation-using-javascript-part-2/

http://blog.pathtosharepoint.com/2008/08/10/the-content-editor-web-part/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜