Jump to:

5542 Posts in 1739 Topics by 1225 members

Customising the CMS

SilverStripe Forums » Customising the CMS » A completly different page in CMS

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

Page: 1
Go to End
Author Topic: 532 Views
  • Futureweb
    Avatar
    Community Member
    232 Posts

    A completly different page in CMS Link to this post

    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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: A completly different page in CMS Link to this post

    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;
    }

  • Futureweb
    Avatar
    Community Member
    232 Posts

    Re: A completly different page in CMS Link to this post

    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...

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: A completly different page in CMS Link to this post

    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

  • Futureweb
    Avatar
    Community Member
    232 Posts

    Re: A completly different page in CMS Link to this post

    that looks like a great module - a great starting point to add more stuff to...

    thanks for pointing it out...

    532 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.