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

Sticky Entries on Parents/Relationships

How Do I?

Tom_Watney's avatar
Tom_Watney
18 posts
10 years ago
Tom_Watney's avatar Tom_Watney

Hello.

An entry is marked as “Sticky”, but it does not appear remain at the top as I would expect:

{parents field="field_name" orderby="date"}
  <h2>{parents:title}</h2>        
  {parents:entry_date format="%j %F %Y"}
  {parents:introduction}
{/parents}

Is this expected?

v2.9.0

       
matthewcarleton's avatar
matthewcarleton
25 posts
9 years ago
matthewcarleton's avatar matthewcarleton

Any luck with this?

       
Tom_Watney's avatar
Tom_Watney
18 posts
9 years ago
Tom_Watney's avatar Tom_Watney

Hi Matthew,

I just tried this again on 2.11.2 and it does still perform the same way (sigh), but I do have a workaround which I just discovered:

{parents field="field_name" orderby="date"}
 {if parents:sticky == 'y'} 
  <h2>Sticky</h2>
  {parents:title}
 {/if}
{/parents}

{parents field="field_name" orderby="date"}
 {if parents:sticky == 'n'}
  <h2>Not Sticky</h2>
  {parents:title}
 {/if}
{/parents}

I feel like this isn’t the most efficient way to do this, but it works.

       
matthewcarleton's avatar
matthewcarleton
25 posts
9 years ago
matthewcarleton's avatar matthewcarleton

ah better than nothing. Thanks!

       

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.