I was wondering.. can I use the same template to display the page in two different layouts?
and how you can switch from one layout to another without adding any segment?
it would be nice for me to use a simple query url, so that you have:
http://mysite.it/portfolio?=list
or
http://mysite.it/portfolio?=thumb
How can I adopt this solution? Thank you!
EDIT: This is a solution found (thanks to Andrew Fairlie and Jean St-Amand):
{exp:switchee variable="{get:view}" parse="inward"}
{case value="grid" default="yes"}
{switchee variable="{get:tag}" parse="inward"}
{case value="{get:tag}"}
<div data-role="infinite-scroll" class="block-stack">
{embed="portfolio/embed-tags"}
</div>
{/case}
{case default="yes"}
<div data-role="infinite-scroll" class="block-stack">
{embed="portfolio/embed-ajax" infinite_scroll_vars="category_id|category_name|segment_1|segment_2" infinite_scroll_values="{segment_2_category_id}|{segment_2_category_name}|{segment_1}|{segment_2}"}
</div>
{/case}
{/switchee}
{/case}
{case value="list"}
<div data-role="infinite-scroll" class="block-stack">
{embed="portfolio/embed-ajax-list" infinite_scroll_vars="category_id|category_name|segment_1|segment_2" infinite_scroll_values="{segment_2_category_id}|{segment_2_category_name}|{segment_1}|{segment_2}"}
</div>
{/case}
{/exp:switchee}