Plugin

Archived
Forum
(read-only)

Switchee

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4

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

     

Switchee + Entry Type + dropdown(select)

Support Request

Hercules
Hercules

Hi,

Im trying to display entries based on selected option and Having hard time with it. Here is my code if you can glance and tell me what Am’I doing wrong.

{exp:channel:entries channel="my_channel" limit="1" dynamic="no"}

    
<select>

    
{ENTRYTYPE all_options="yes"}
        
<option selected="{selected}" value="{option}">{label}</option>
    
{/ENTRYTYPE}

    
</select>


{exp:switchee variable="{ENTRYTYPE:selected}" parse="inward" match="all"}

    {case value
="value1"}
     
<h3>value 1</h3>
    
{/case}

    {case value
="value2"}
    
<h3>Value2</h3>
    
{/case}

    {case value
="value3"}
   
<h3>Value 3</h3>
    
{/case}

{
/exp:switchee}

{
/exp:channel:entries} 


Thank you so so much!