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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Site structure / page types


Go to End


3 Posts   1430 Views

Avatar
chinaski

Community Member, 26 Posts

7 October 2009 at 6:55am

Just looking before I jump here, as I am starting on my first SS project. The site I'll be building has four main program types and they will each have their own top level menu. To make this more concrete, the site will have four top-level program sections for Senior, Adult, Teen and Youth programs. Each program will be comprised of the same information, i.e. the data to build the page will be the same for each and the only difference is in the program type. So first question, what is the best way to handle this structure? Can I create a page type that doesn't display (a generic program), and extend it for each of the program types?

The second feature I'm going to need is a news section that collects news based on page section. I.e. I want a general news gatherer that will collect news items by main page section - some sort of flag in there that I can use to show stories for, say, Adult programs on the adult page, but on the home page I can show a collection of all stories. Second question: what's the best way to do this?

Thanks for any feedback you can give.

Avatar
dalesaurus

Community Member, 283 Posts

7 October 2009 at 7:55am

Edited: 07/10/2009 7:56am

>Can I create a page type that doesn't display (a generic program), and extend it for each of the program types?
If you are a programmer you could create a custom Page Type for your programs (ie. Program Page) and then create one for each of the major types. Otherwise you will just be creating 4 regular Pages and copying the general layout of the content for each and altering it as needed.

>I want a general news gatherer that will collect news items by main page section
I'm not sure what constitutes a "general news gatherer" but you will be able to create a custom page type with the flags you need. You can then use the DataObject and Search function to filter results as needed. See Tutorial 2 for a thorough example of this: http://doc.silverstripe.com/doku.php?id=tutorial:2-extending-a-basic-site

In fact, have a look at all the tutorials. They should get you moving for what you've outlined:
http://doc.silverstripe.com/doku.php?id=tutorials

Avatar
chinaski

Community Member, 26 Posts

7 October 2009 at 11:28am

thanks, i have looked at the tutorials and i am familiar with programming so I don't forsee too many issues other than getting used to the SS way of doing things. What you suggest for page type is exactly what I was thinking about so that's cool.