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.

Category and duplicate entries

May 30, 2013 4:46pm

Subscribe [1]
  • #1 / May 30, 2013 4:46pm

    Daniel_E9

    10 posts

    I have a site with three sections: Home, Blogs, Work

    Say I setup three sets of categories to tag the posts with:

    1) Section: (Home, Blogs, Work) - the section of the site
    2) Area: IT, Development, Music - area of expertise
    3) Type: Web, Letter, Note - type of post

    If I categorise a post with ‘Work’ and ‘Development’ - to go on the work page how would I only show a post that has these two distinct categories checked?

    Currently, if I tag something with ‘Development’ under the ‘Blog’ section, the post from the ‘Work’ section shows up too, due to it having the same category checked ‘Development’.

    Any ideas, on how I can get distinct entries per page, based on what section category is ticked?

    Thanks

  • #2 / May 30, 2013 9:51pm

    Bhashkar Yadav

    727 posts

    Hi Daniel,

    Did you look at category parameter for the channel entry tag http://ellislab.com/expressionengine/user-guide/modules/channel/channel_entries.html#category

    If it not helping you, please share further.

  • #3 / May 31, 2013 4:38am

    Daniel_E9

    10 posts

    This is what I have been using, but it says that even if you use category:not the post will still show up.

    My category request looks like below on the work section:

    Category ID:
    1 = Home, 2 = Blogs, 3 = Work, 4 = IT, 5 = Development, 6 = Music, 7 = Web, 8 = Letter, 9 = Note

    {exp:channel:entries channel="posts" category="3|5" category="not 1&2"}
    {title}
    {/exp:channel:entries}

    This obviously pulls in all posts tagged with ‘Development’ but ones I had tagged under ‘Blog’ (not work)

    Basically, is there any way of getting distinct posts if they are tagged under the same category?

    Thanks

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

ExpressionEngine News!

#eecms, #events, #releases