21282 Posts in 5730 Topics by 2601 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1253 Views |
-
Custom Field on Page Class

12 April 2009 at 1:06pm
I have a scenario where i have added a custom field (Navigation Image) to the Page Class - but I do not want this custom field to be available on all other Classes that extend the Page Class. Is the best way to do this is to add $fields->removeFieldFromTab to all the Classes that extend Page Class? Or is there a better, more efficient means of doing this?
-
Re: Custom Field on Page Class

12 April 2009 at 1:17pm Last edited: 12 April 2009 1:19pm
Hi
You can do this instead:
if($this->ClassName == "Page")
$fields->addFieldToTab("Root.Content.Main", new TextField("PageField"));Infact that's a pretty good snippet for SSbits, thanks!
-
Re: Custom Field on Page Class

14 April 2009 at 2:34am
exactly what i was looking for and worked like a charm!
also, checked ssbits.com. great resource - had not come across this yet.
| 1253 Views | ||
|
Page:
1
|
Go to Top |


