Plugin

Developer
Supported

Single Field

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Laisvunas

     

You must be logged in to post.

Can Single Field be used as a parameter value in a channel entries tag?

General

Mark Terpstra
Mark Terpstra

That’s great news that Single Field is available for EE2. I use it on many sites.

Is it possible to use the Single Field tag as a parameter value in a channel entries tag?

This is what I was hoping to do…

{exp:channel:entries channel="pages" entry_id="{exp:single_field  field="my_custom_field" weblog="pages" url_title="{segment_2}" site="1" field_format="none"}" dynamic="off"}

CONTENT

{exp
:channel:entrie} 
Laisvunas
# 1
Developer
Laisvunas

Hi Mark,

Your code will not work because of parse order.

But you can achieve what you need by using Field Value plugin:

{exp:field_value  weblog="pages" url_title="{segment_2}" site="1" field_format="none" parse="inward"}
{exp
:channel:entries channel="pages" entry_id="{field_value_my_custom_field}" dynamic="off"}

CONTENT

{exp
:channel:entries}  
{
/exp:field_value} 
Mark Terpstra
# 2
Mark Terpstra

Much obliged. That will work perfectly.

Mark Terpstra
# 3
Mark Terpstra

Just purchased fresh copies of Single Field and Field Value. Thanks.