0

I am working on a site that has an articles page. On this page a user is given the option of viewing in list view or table view. However there's pagination on the page.

What happens is, when the user selects a view and paginates ti the second page, the default view is set again.

Is it possible to keep the users chosen view until they change it again? and can this be done without the use of cookies?

thanks

0

If you don't want to use cookies, you'll have to add an extra segment to your URL to indicate the layout, and then check for the value of that segment when deciding which layout to use.

For example: /articles/list/P10 vs /articles/grid/P10.

{if segment_2 == 'list}
    // Template for list view
{if:else}
    // Template for grid view
{/if}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.