Remove possibility to "Fetch data from"

I want to remove the possibility to choose "Fetch data from" ("Hämta data från") for all pages (page types) on my web. Is that possible without too much work and agony? It seems hard to accomplish since it's a part of the default properties for every page. Regards, /Olle Tyrland Valtech AB
Nov 23, 2005 15:14
I have a question which kindof links to this one. I want to remove the whole tab completely! I know how to add my own tabs but this is the first time the customer has asked to hide default EPiServer tabs. I guess our goals are the same... /John
Nov 23, 2005 17:47
Hi John, Maybe changing the access level to that particular tab would solve your problem? (for 4.50: /Admin-->Page Type-->General Settings-->Edit Headings) This will not hide the tab for users with administer rights. I don't know how to hide it for _all_ users. /Olle
Nov 24, 2005 9:20
I don't know exactly how to remove this option from the dropdown box. This is being rendered deep inside epi, and it is also a builtin property on the pages. You can however do a check when saving a page. See DataFactory.SavingPage for more information. In here you can check if the property has been set to Fetch data from. If so, you can deny saving the page. Frank :)
Nov 24, 2005 14:15
Actually Frank good point. I do something similar to this in another part of the site. I create pages after the publish button is pressed. I do so like this: protected void Application_Start(Object sender, EventArgs e) { Global.EPDataFactory.PublishingPage += new PageEventHandler(CreateNewPage); System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("sv-SE"); } private void CreateNewPage(object sender, PageEventArgs e) thanks /John
Nov 28, 2005 15:52
Here is some sample code on how to hide properties. If there are no properties for a tab left it will not be rendered: protected void Application_Start(Object sender, EventArgs e) { Global.EPDataFactory.LoadedPage += new EPiServer.PageEventHandler(EPDataFactory_LoadedPage); } private void EPDataFactory_LoadedPage(object sender, EPiServer.PageEventArgs e) { e.Page.Property["PageShortcutType"].OwnerTab = -1; e.Page.Property["PageShortcutLink"].OwnerTab = -1; e.Page.Property["PageTargetFrame"].OwnerTab = -1; e.Page.Property["PageLinkURL"].OwnerTab = -1; }
Dec 02, 2005 17:17
Definitely an undocumented solution, but a far better one! :D
Dec 04, 2005 21:39
Thanks, that is great information, Linus! It solves a few issues in other projects. But, to go back to my original request, is there any way to hide just the "Fetch data from..." option? 48.000-kronors-frågan. /Olle
Dec 06, 2005 9:49
That's nice. Is it possible to do a similar solution to Dynamic Properties? Regards, Micke
Dec 06, 2005 10:13
"Definitely an undocumented solution, but a far better one!" - I updated the documentation for the PropertyData.OwnerTab Property in the SDK. "That's nice. Is it possible to do a similar solution to Dynamic Properties?" - Sorry, but this is not possible to do with dynamic properties as far as I can see as there are no events when loading the dynamic properties for a page. "But, to go back to my original request, is there any way to hide just the "Fetch data from..." option?" - There are probably ways but I have not solved this yet. I'll try some more if I get some time over next week. ps. You might want to add this row in the beginning of the EPDataFactory_LoadedPage method just for a slighty performance increace: if(!e.PageLink.LoadRawPageData) return; ds.
Dec 09, 2005 18:15
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.