Jump to:

5451 Posts in 1673 Topics by 1197 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Another way to implement PageType. Is it possible?

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

Page: 1
Go to End
Author Topic: 500 Views
  • Dramew
    Avatar
    Community Member
    9 Posts

    Another way to implement PageType. Is it possible? Link to this post

    When I want to implement some new feature and let user (content editor), for example, create forms on his page, I can write new Page Types or use modules, which implement those Page Types. And user can then select in the Behaviour tab - page type of current page. But what if I want, for example, to let user be able to create his UserDefinedForm, Gallery and smth else on the same page. As I understand, I have to create new page type which will be able to handle all those things.

    I am not a great PHP developer (so I do not know is it hard to implement), but wouldn't it be better and easier for content editors to be able to "Add new features to page" rather than select "PageTypes". Because, at some point there can be a lot of page types, with which it is not easy to work. And if user could "Add new features to page" (for example, I want to insert some form into current page, then I have just to to "enable" this feature and new tab will appear in which I can define my new form), it would a lot more "UserFriendly".

    Is it possible at this moment?

  • Willr
    Avatar
    Forum Moderator
    5464 Posts

    Re: Another way to implement PageType. Is it possible? Link to this post

    While it would be easier for content authors it would be challenging from a backend development. The thing about page types is that you can define your datamodel (i.e fields) and you can write your templates to use those fields. If this was all up to the user then it would be near on impossible to build anything more than a simple website. Imagine if you wanted a page type with a image field, you would require the user to add this feature but then how do you update the template based on each combination of things people could add.

    It would require a major overhauling of the entire framework to support something like that and would require a lot of configuration / design around it since you would want a mix of user controllable extensions.

    Would make a nice client facing tool but probably not suitable for the core cms.

  • Dramew
    Avatar
    Community Member
    9 Posts

    Re: Another way to implement PageType. Is it possible? Link to this post

    Thank you for the quick answer Willr.
    I can imagine that it is not easy to make such system. But what I mean is: when we create new page type we can inherit properties from ancestor page type; so it seems like I can create a page type which will implement different features and then let the user choose what features he wants to be enabled and which disabled.
    I think I have to look at this deeper myself, because maybe I do not understand smth clearly at this moment about possibilities of cms.
    But anyway thank you for the answer. Silverstripe is really great and all this is just my thoughts about how to make it even better =)

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