5099 Posts in 1519 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 342 Views |
-
A completly different page in CMS

28 September 2011 at 11:01pm
Hi,
Using class ModelAdmin one can add a new tab into the CMS to control dataobjects - what I'm wondering if there is a way to add a new tab, which just loads an SS page template - which can then be used to display/work with data in a complete templateled and free way...
this would be great - for creating a kind of dashboard page with various bits of info, and for displaying reports using charts and stats etc etc...
Cheers
-
Re: A completly different page in CMS

28 September 2011 at 11:29pm
absolutely - you might add a LiteralField to a new tab... populated with some data put into a template...
function getCMSFields() {
$fields = parent::getCMSFields();$vd = new ViewableData();
$ad = new ArrayData(array('Info' => DataObject::get('SomeObject'));
$strSomeHTML = $vd->customise($ad)->renderWith('TemplateName');
$fields->addFieldToTab('Root.Bookings', new LiteralField('Label', $strSomeHTML));return $fields;
} -
Re: A completly different page in CMS

29 September 2011 at 9:58am
Hi Swaiba - thanks for that snippet...
Note: I'm trying too add a tab to the very top of the CMS - along with 'pages' 'files and images' etc...
infact, I've just found:
http://doc.silverstripe.org/sapphire/en/reference/leftandmain?s=extra%252520menu%252520items
which seems to be what I need... -
Re: A completly different page in CMS

29 September 2011 at 9:34pm
Ahhh... Then this may be of interest to you...
http://www.silverstripe.org/dashboard-module/
I've taken this and put graphs with http://chart.apis.google.com into it to make a dashboard for a client
-
Re: A completly different page in CMS

29 September 2011 at 11:19pm
that looks like a great module - a great starting point to add more stuff to...
thanks for pointing it out...
| 342 Views | ||
|
Page:
1
|
Go to Top |


