Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Customising the CMS /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Managing external apps through CMS


Go to End


2 Posts   1207 Views

Avatar
CHD

Community Member, 219 Posts

14 December 2010 at 9:53am

evening all,

i've recently installed a nice PHP calendar here:
http://dev2.clickheredigital.co.uk/availability/

and for my client to manage the avaiabilty of said calendar, they simply go here:
http://dev2.clickheredigital.co.uk/calendar/ac-admin/index.php

now i'd LOVE to integrate this into the SS CMS somehow but i think im way out of my depth.
so then i thought about just adding a link in the CMS but i cant even work out how to do that!
i think the best option would be a new TAB either at the very top or the content page, then an iframe of the calendar admin page.

can anybody help with this?

cheers!

Avatar
CHD

Community Member, 219 Posts

16 December 2010 at 3:13pm

never mind, worked it out!

for anybody interested... easiest way to add your own content like this to the backend seems to be using literal fields.

so, i created a file in mysite/code called calendar.php

within that i created a new tab for the calendar CMS page, and in there is a new literal field, and then an iframe! works perfectly.

	//CMS fields
	function getCMSFields() {
		$fields = parent::getCMSFields();
	
		$fields->addFieldToTab('Root.Content.Availability', new LiteralField("","<iframe src ='URL HERE' width='100%' height='400'><p>Your browser does not support iframes.</p></iframe>")); 
		
		return $fields;	
	}

now i just need to workout how the session ID works for SS so that i can amend the PHP calendar login file, meaning you need to be logged in to SS before you can access the calendar admin area...hmmmm....