1

In the past, I've mainly coded Home page Heroes the following ways:

1) individual channel tags with the offset parameter 2) Low Variables 3) Setup a custom feature that basically flags that the entry is for the hero. 4) an individual channel, and use the sticky functionality to designate which one should appear in the hero.

Trying to think of a creative way to code a Hero where there are 6 stories with one being the "Headline" Story for the day.

Any thoughts would be appreciated.

Thanks!

1
  • I could create 2 channels that use the same field set and assign the lead story to one channel and when I'm ready to move it assign it to the "normal" channel. – therooster Jun 5 '14 at 19:39
1

You could use a a custom field - checkbox or dropdown so you know what the value will be - and a channel:entries tag pair using the search parameter to find entries with that value in the custom field.

You could use a status - but I dislike status because once you go past using just "open" statuses you have to declare all your status everywhere (IE the "featured" status entries won't show unless you tell them to even in places where they need to appear along with the open entries).

3
  • 1
    I prefer status, specially because I can sort the entries by them and, as featured comes before open, there's always a fallback. A snippet or a config variable can be used to store the status. – Sobral Jun 5 '14 at 20:54
  • Thanks Guys. Mike I've done the custom field before, that works also. – therooster Jun 6 '14 at 7:50
  • Robson, I like the idea of using status. haven't thought about that one. so do your hero shows only items marked as featured, and you other area shows only open status? – therooster Jun 9 '14 at 4:09
0

I would use the channel entries tags and set a limit to the number of post that show. Then I would only show the post that are made sticky. Below is an example of what I am talking about.

{exp:channel:entries  channel="news" limit="2"}

  {if sticky == 'y'}

    HTML code here....

  {/if}

{/exp:channel:entries}
1
  • yep, and the newest sticky wins out. – therooster Jun 5 '14 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.