Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class GoogleMapXML extends Page {
- static $icon = "themes/xtreme-diving/images/treeicons/xml";
- static $has_many = array(
- 'GoogleMapXML' => 'GoogleMapObject'
- );
- function getCMSFields() {
- $fields = parent::getCMSFields();
- $fields->addFieldToTab( 'Root.Content.Main', new TextField( 'NameOfSite' ) );
- $fields->addFieldToTab( 'Root.Content.Main', new TextField( 'StartPoint' ) );
- $fields->addFieldToTab( 'Root.Content.Main', new TextField( 'EndPoint' ) );
- $fields->addFieldToTab( 'Root.Content.Main', new TextField( 'Zoom' ) );
- $fields->addFieldToTab( 'Root.Content.Main', new TextField( 'Text' ) );
- $tablefield = new HasManyComplexTableField(
- $this,
- 'GoogleMapXML',
- 'GoogleMapObject',
- array(
- 'NameOfSite' => 'Divesite',
- 'StartPoint' => 'Start Latitude/Longitude',
- 'EndPoint' => 'End Latitude/Longitude',
- 'Zoom' => 'Zoom level',
- 'Text' => 'Text'
- ),
- 'getCMSFields_forPopup'
- );
- $tablefield->setAddTitle( 'Add divesite' );
- //$tablefield->setParentIdName('GoogleMapXMLID');
- $fields->addFieldToTab( 'Root.Content.GoogleMapObject', $tablefield );
- return $fields;
- }
- }
- class GoogleMapXML_Controller extends Page_Controller {
- }
- ?>
Add Comment
Please, Sign In to add comment