This is my first Umbraco Project, and I have created a simple insurance website with a homepage and 6 subpages. I have created a "Pages" Document Type and using that Ive created 6 Content Pages. Now each page has 3 tabs on it, and as Im using a single DocType to create all the pages, the Tab name (which is shown on the admin side) remains the same for each page (i.e Tab1, Tab2, Tab3). But obviously each page has different content and hence different tab names ("Do I need Life Insurance?" , "What is Life Insurance?" , "Types of Life Insurance"). What I need to do is to be able to change the tab name dynamically so that the tab get the same name as my page. So for example, (on the admin panel) under the Content Folder, The Tabs of the "Life Insurance" page will be named as "% Life Insurance" and the Tabs of the "Home Insurance" page will be named "% Home Insurance" (where % is some fixed Text for all tabs of the pages)
My question is; is it possible to change the name of a content tab dynamically? Please help me with this simple question :)
Change name of a Content Tab Dynamically
This is my first Umbraco Project, and I have created a simple insurance website with a homepage and 6 subpages. I have created a "Pages" Document Type and using that Ive created 6 Content Pages. Now each page has 3 tabs on it, and as Im using a single DocType to create all the pages, the Tab name (which is shown on the admin side) remains the same for each page (i.e Tab1, Tab2, Tab3). But obviously each page has different content and hence different tab names ("Do I need Life Insurance?" , "What is Life Insurance?" , "Types of Life Insurance"). What I need to do is to be able to change the tab name dynamically so that the tab get the same name as my page. So for example, (on the admin panel) under the Content Folder, The Tabs of the "Life Insurance" page will be named as "% Life Insurance" and the Tabs of the "Home Insurance" page will be named "% Home Insurance" (where % is some fixed Text for all tabs of the pages)
My question is; is it possible to change the name of a content tab dynamically? Please help me with this simple question :)
Hello,
In this case it probably would have been easier to just create separte document types for this.
You could try to use events for this: http://our.umbraco.org/documentation/Reference/Events/application-startup
With the old events you could try to use the AfterContentControlLoad event. In this example I try to hide the complete menu per tab: http://our.umbraco.org/forum/using/ui-questions/33518-Hide-arrows?p=0#comment123057. So you already have the tab controls available and maybe you can change the name too. Try the Text property.
Jeroen
is working on a reply...