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.

Template Questions /

View control by mulitple query stings.


Reply


374 Views

Avatar
Ditinn

Community Member, 1 Post

12 February 2012 at 7:28pm

Edited: 12/02/2012 7:28pm

Hey everyone,

I should preface this by saying I'm a self taught amateur web developer so undoubtedly their will be some questions that may seem quite obvious to others - your help would be very appreciated.

I'm working on a folio site for my work, a mixture of projects from building design (I'm an architect by trade) and other pieces of graphic work etc.

I'm trying to achieve something similar to the showcase page here. [url]http://www.silverstripe.org/community-showcase/[/url]

In particular the way the display is controlled in two ways. 'Sort by' and 'View. (see attached screen grab). I have a basic understanding of how to pass a url query string back and use and 'If' statement to then manipulate the layout. However I'm unsure how to go about adding them together. In my case I'm trying to have two view types (grid and list) and then also filter by category.

Such as;

mydomain.com/work/?view=list&category=architecture&category=residential

Could someone share an example of there page template to get me started?
Is it a case of formatting the page for every possible 'if' outcome?

Regards,

Attached Files