ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

select category

April 06, 2012 2:51pm

Subscribe [2]
  • #1 / Apr 06, 2012 2:51pm

    Ralph Bartsch

    31 posts

    I have set up a website using categories.
    When a visitor arrives on the index page the page lists all the records instead of only the ones tagged as homepage.

    How do i autoselect categories if none is selected, user has not made any selections yet?
    should i instead build a “landing page” only used if the visitor has not selected any categories yet?

    staging site: http://permorberg.rb-studios.se


    thanks in advance

    Ralph

  • #2 / Apr 06, 2012 3:11pm

    John St-Amand

    865 posts

    You mean you want to have the home page entries loop limited to those entries that have “homepage” assigned as a category?  You would simply need to add the category=”#” parameter to the entries loop.  But If you are using the same template for your interior pages, then you may need to do so with a conditional - a conditional that is determined by being on the home page.  So something like :

    {if segment_1 == ""}
    you are on the home page
    {if:else}
    you are not on the home page
    {/if}

    Hope this helps.

  • #3 / Apr 06, 2012 4:53pm

    Ralph Bartsch

    31 posts

    Yes that is what i want, and thank you, that is what i needed

    Thank you john St.amand

    Ralph

     

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases