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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Flexbile Contentpublishing - but how?!


Reply


2 Posts   827 Views

Avatar
Breastfed

Community Member, 44 Posts

30 April 2009 at 11:44pm

Hello

i am very happy with SS so far - but now i am stuck at a point where i dont know how easy and flexible Content can be published.

There is a Content Website and the Owner of the Site wants to give his Visitors and bunch of Content.
So he needs a Text Editor, a Gallery, a Downloadlist, Tables etc.

Sometimes he only needs Text and Downloads - Sometimes all and so on.

But how can he decide what he is using for his Content?

I can not say "PLease Customer XY use the WYGIWYS Editor to publish your 11 Picutres of the Anniversy of your Company".

So - how can i put different Contentsituations inside a certain Page?

Attached is an image which can be seen as an Example.

Would love to get some input,
thanks!

Attached Files
Avatar
banal

Community Member, 901 Posts

1 May 2009 at 12:08am

There are (as always) different solutions for you problem. I'd probably solve it like this:
Create a specialized Page class for all your content types (eg. GalleryPage, TextPage, DownloadPage). Create a Holder-Page class that allows only the previously mentioned Pages as children.
The Holder-Page will be the page that's being displayed. All children of this page will be the content parts of that page:

HolderPage
+-- TextPage
+-- GalleryPage
+-- TextPage
+-- DownloadPage

In the template you simply iterate through all children and output their contents.
The last problem to solve is that the content-part pages should not be accessible directly. You could add a redirect to their parent in that case, so the visitor will always land on the HolderPage.

This system will be quite flexible, since the content-editor can add as many content-parts to the holder-page as he wants. I'd probably also create some special icons for the content-pages so that they can be distinguished easily from normal pages.

On a side note: Maybe the whole thing could be solved with the DataObjectManager Module. You could ask UncleCheese in his thread if that would be possible: http://www.silverstripe.org/all-other-modules/show/253878