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.

Assign category automaticaly

August 21, 2007 1:17pm

Subscribe [1]
  • #1 / Aug 21, 2007 1:17pm

    Ben McNelly

    20 posts

    I am using the web publish form to allow users to publish some data. I would like to assign categories according to the value of a custom field.

    Example:

    A custom field (eg, “you_say”) has a drop down with two values, “Yes” and “No”. I also have categories assigned to this weblog, and if the custom field = “Yes” I would like to assign the category “said_yes” to the entry.

    This would allow me to filter out weblog entries that contain “Yes”.


    *There is a reason I cannot use an if statement in my template like this

    {if you_say = "Yes"} foo {/if}

    to sort the weblog. This is because the parameters for sorting the weblog will be determined by another members post.

    Its complicated but the easiest analogy that makes sense is like if your were building a matchmaking/dating site. One template would be for sorting weblog entries of other people for the current logged in member. And the reason I cannot simply hard code this, is because the user may change what preferences they have for sorting, besides it needing to be dynamic in the first place.

    Any ideas?

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

ExpressionEngine News!

#eecms, #events, #releases