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.

Blog Module /

Discuss the Blog Module.

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

Display multiple blogs differently (alphabetically or date order)?


Go to End


3 Posts   2228 Views

Avatar
Kay Jay

Community Member, 2 Posts

22 February 2011 at 3:29am

I have a couple of different blogs on my site. One of which is a 'news' style blog with all the entries displayed in date order, which is fine.

The other blog is more of a biographies listing and it would be great if these could be displayed in alphabetical order or in the order they appear within the admin area.

Anyone know how I could achieve this so that it recognises which blog is being displayed and orders the entries either in alphabetical or date order.

Any help would be greatly appreciated - PS: rather new to this so be gentle with your answers ;-)

Thanks in advance :-)

Avatar
drewbs

Community Member, 5 Posts

26 February 2011 at 3:52pm

Are you sure a blog is what you are looking for your bio listings? Blogs are generally organized chronologically. The best way to accomplish what you are attempting to do may be to create a BioPage type and a BioPageHolder type.

If you have not already you should take a look at the following tutorial http://doc.silverstripe.org/sapphire/en/tutorials/2-extending-a-basic-site

If I remeber correctly it does a pretty good job walking you through creating what you may be looking for. In the BlogHolder Page controller you could add logic to order the bio entries alphabetically or in the order they appear in the admin area. The tutorials on http://doc.silverstripe.org/ are pretty valuable if you are just getting started.

You could also extend the blog module but depending on what you are trying to accomplish I think the first solution may work better for you.

Avatar
Kay Jay

Community Member, 2 Posts

28 February 2011 at 10:08pm

Thanks for your reply and instruction on this. You're right, a blog entry might not be the best way to achieve this, but under the time constraints I had to get what they wanted, it seemed the quickest solution.

I'll have a look at the links you have posted, and I'm sure I'll get it sorted - hopefully :-).

Thanks again for your reply.