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.

Customising the CMS

Add a page button


Reply

3 Posts   883 Views

Avatar
Harley

31 August 2009 at 8:47pm Community Member, 153 Posts

Hi,

I have set up a news holder and pages that can be created under that. Hopefully what I want to do though, is rather than the user having to create their own page etc... if I could create a tab titled 'Add news story' which basically has all the fields I need which they can then input into, which would take care of all the behaviour etc rather than them creating pages.

Is this at all possible and does anyone have any ideas of how this could be achieved?

Thanks

Avatar
_Vince

1 September 2009 at 9:00am (Last edited: 1 September 2009 9:01am), Community Member, 161 Posts

I'm not an expert, but perhaps you could remove the Content field and that way the users wouldn't be able to input random stuff.

function getCMSFields() {

$fields = parent::getCMSFields();
$fields->removeFieldFromTab('Root.Content.Main', 'Content');

return $fields;
}

You could then create a DataObject where you have all the fields or columns that make up the page.

The users could then input stuff through a popup on a dedicated page or a tab.

But there's probably better ideas out there.

Avatar
zenmonkey

2 September 2009 at 1:18pm Community Member, 528 Posts

You could do this with the DataObjectManager Module Quite easily.

Create a DataObject containing your news fields and have it Managed with a DataObjectManager instead of pages.