To change the title of a custom added page on the Enterprise portal
1. Import the sharepoint page into AOT. Goto the web url menu item and import the page in consideration
Once the page has been imported into AOT it will be visible under page definitions in the AOT
Select the page in question and pull up the property list. In the property list change the title to the desired title sting
The other scenario to change the page title would be when the user control needs to use a context and change the title of the page. In such cases the page load event of the user control can be used as shown below.
For the above code to work it is important that a link of the userControl web part is established with the AXTitle web part, using the EP page edit option as shown below
1. Import the sharepoint page into AOT. Goto the web url menu item and import the page in consideration
Once the page has been imported into AOT it will be visible under page definitions in the AOT
Select the page in question and pull up the property list. In the property list change the title to the desired title sting
The other scenario to change the page title would be when the user control needs to use a context and change the title of the page. In such cases the page load event of the user control can be used as shown below.
protected void Page_Load(object sender, EventArgs e) { ITitleProvider titleProvider = AxBaseWebPart.GetWebpart(this) as ITitleProvider; // Specify the title to pass as the AxPageTitle titleProvider.Caption = "Page title goes here"; // Do not include the context in the title titleProvider.ShowContext = false; }
For the above code to work it is important that a link of the userControl web part is established with the AXTitle web part, using the EP page edit option as shown below
No comments:
Post a Comment