Hi, Steve. One way to do this would be to use a custom status. Just be sure if you go that route to check for the other status in regular exp:weblog:entries loops.
Well… I’ve now tried this two ways. So far neither way gets me the results I want.
My first attempt I created a drop-down field called “show_on_home_page”. If “show_on_home_page==‘yes’” then, print out the fields I want from that entry.
I got two not-quite-right results from this try. The first one I used this code:
{exp:weblog:entries weblog="plaques" orderby="random" limit="1"}
{if show_on_home_page == "yes"}
<b>title: {title}</b>
<hr>
{if:else}
we got no entries
{/if}
{/exp:weblog:entries}
Looks like it takes a single entry out of the weblog - if it’s not a “show on homepage” entry then we get nothing to show.
Second incorrect attempt with “show_on_home_page” uses this code:
{exp:weblog:entries weblog="plaques"}
{if show_on_home_page == "yes"}
<b>title: {title}</b>
{/if}
{/exp:weblog:entries}
I would think this should pull up *all* of the entries where ‘how_on_home_page == “yes”’, but it only pulls up two of them.
gnarrr!
So, Take Two I created a custom status called “home-ok”, Now this code:
{exp:weblog:entries weblog="plaques" status="home-ok" orderby="random" limit="1"}
<b>title: {title}</b>
{/exp:weblog:entries}
Pulls up one of the three entries marked with this status… But it’s the same one every time.
To recap: this weblog called “plaques” has a whole bunch of entries. I want to be able to mark a subset of these entries in such a way that I can pull just one entry that’s been marked and show it’s fields on the home page. Not every entry is something to be shown on the home page… I also want it to pull a random one of that subset every time.
Surely I’m being dim and just not getting something. Help?
You can see this stuff not working here: http://www.kcymaerxthaere.com/testhome