We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Show content parts with status parameter?

How Do I?

Riverboy's avatar
Riverboy
2,993 posts
10 years ago
Riverboy's avatar Riverboy

I need a way to show channel:entry content with open vs custom status.

By this I mean: Show basic fields and their content if status is “open” Show ALL fields when status is “custom”.

I tried to use conditional inside of channel:entry loop but that didnt get me anywhere but errors. So seems that using if status=”custom” is not available for to use (bummer)…

How I can hide/show fields on entry page depending on entry status?

Is the only way to make 2 channel:entry looping pairs with other having status set to “open” and putting fields I want to show inside, and then double it and changing status to “custom” and putting all fields inside of that looping pair?

If so, that sucks :(

Am I missing something that can be used to filter content fields with status parameters using only one channel:entry loopin pair?

       
Riverboy's avatar
Riverboy
2,993 posts
10 years ago
Riverboy's avatar Riverboy

Got solved this one. But if someone might have the same issue what I have:

Be sure to use exact word. So this didnt work on my case:

{if status == 'custom'}--content here--{/if}

But this is working

{if status == 'Custom'}--content here--{/if}

In, at least my case and installation, 2 default statuses (open and closed) does not have to start with capital letter, but custom statuses I’ve added, has to start (because when I created those, I typed new status as Custom, not custom) - making things a bit confusing because when using statuses in channel:entry opening tag as a parameter, they does not need to start with capital letter.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.