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   905 Views

Avatar
Harley

Community Member, 153 Posts

31 August 2009 at 8:47pm

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

Community Member, 162 Posts

1 September 2009 at 9:00am

Edited: 01/09/2009 9:01am

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

Community Member, 528 Posts

2 September 2009 at 1:18pm

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.