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.

How to show entries only equal to particular value of custom field?

August 27, 2007 12:06pm

Subscribe [2]
  • #1 / Aug 27, 2007 12:06pm

    dardar

    18 posts

    I’ve already read a lot, but still not able to resolve quite simple (from my point of view) problem: how do I show only such entries, which one of custom fields has a certain value?
    For example I have weblog with custom fields: ‘lyrics’ , ‘written_by’. I would like to show only such entries, which ‘written_by’ value is ‘Great singer’. Is possible to do that using parameters or any other way?

  • #2 / Aug 27, 2007 1:55pm

    e-man

    1816 posts

    I’ve already read a lot, but still not able to resolve quite simple (from my point of view) problem: how do I show only such entries, which one of custom fields has a certain value?
    For example I have weblog with custom fields: ‘lyrics’ , ‘written_by’. I would like to show only such entries, which ‘written_by’ value is ‘Great singer’. Is possible to do that using parameters or any other way?

    Just use a conditional:

    {exp:weblog:entries weblog="weblog1" other parameters}
    {if written_by =="Great singer"}
    whatever you want to do or show here e.g.
    {lyrics}
    {/if}
    {/exp:weblog:entries}
  • #3 / Aug 27, 2007 3:23pm

    dardar

    18 posts

    Thank you very much, but I already thought about that. I am just afraid - if I have, let’s say 5000 entries, will EE loop through all off them and output only several with this condition? I think it will be too hard to handle for server. Maybe better I should use {exp:query} in this case?

  • #4 / Aug 27, 2007 3:27pm

    e-man

    1816 posts

    Thta’s another option but I really couldn’t tell you if it would be faster.
    You’ll have to test this on your own server I guess 😊

  • #5 / Aug 27, 2007 3:47pm

    Lisa Wess

    20502 posts

    You might also check out Mark Huot’s custom fields in weblog entries extension.  It’s in the extensions forum here =)

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

ExpressionEngine News!

#eecms, #events, #releases