Hi, not helping much but I’ve just tried the extension and again it doesn’t seem to be working…
I was hoping the below code would only display entries where ‘casestudy-thumb’ contained content. stripping the limit and orderby parameters, disabling other extensions doesn’t help either.
<dl>
{exp:weblog:entries weblog="studies" limit="1" orderby="random" casestudy-thumb="/.+/"}
<dt><a href="http://{comment_url_title_auto_path}">{title}</a></dt>
<dt class="image"><a href="http://{comment_url_title_auto_path}">{casestudy-thumb}</a></dt>
<dd>
{exp:html_strip}{exp:char_limit total="125"}
{casestudy-intro}
{/exp:char_limit}{/exp:html_strip}
<a href="http://{comment_url_title_auto_path}">Read the full Case Study...</a>
</dd>
{/exp:weblog:entries}
</dl>
OK I just tried to do things slightly differently but still got odd results.
I created a new custom field called ‘casestudy-featured’ which was a dropdown list with values Yes and No.
I then set one entry to ‘Yes’ and used the code below.
{exp:weblog:entries weblog="studies" casestudy-featured="/Yes/"}
...
{/exp:weblog:entries}
</dl>
Doing that still displays all the entries.
Then tried limiting.
{exp:weblog:entries weblog="studies" limit="1" casestudy-featured="/Yes/"}
...
{/exp:weblog:entries}
Only displays one entry but it’s not an entry where casestudy-featured is set to Yes.
Then checked to see if it was anything to do with the hyphen in the name.
{exp:weblog:entries weblog="studies" casestudyfeatured="/Yes/"}
...
{/exp:weblog:entries}
Without the hyphen (and without limiting entries) it works! If I do limit the entries though it doesn’t display anything.
Hope some of that helps you debug 😊
Alright, I made a few changes and I got it working using the following field names:
You can download the most up to date version (1.0.2) above. Let me know if it helps. I’ve also updated the multi drop-down list extension in case it isn’t playing nice with this extension. you can download that here: http://ellislab.com/forums/viewthread/38370/
Limit will not work based on the core functionality of EE. So I am planning on including my own limit field, something like ext_limit=”10” but for now I would (if you have the processing power) leave out the limit and put a conditional check in at the beginning to check the count: {if count < 10}{/if}
Thanks Mark, I look forward to it.
Just as an aside, I don’t think using the {count} variable is going to work in the short term either for me. I have 12 entries, 2 of which have the custom field ‘casestudy-featured’ set to Yes.
When I run…
{exp:weblog:entries weblog="studies" casestudy-featured="Yes"}
{count}
{/exp:weblog:entries}
…the 2 entry’s count variables output as 7 and 10, not 1 and 2 as you’d expect.
I’m gonna go back to using {if casestudy-featured} for now. thanks for your help so far though 😊
Mark, something not quite right going on 😊
There are 10 entries, 3 are set to Yes on ‘casestudy-featured’. (I’m not sure if those numbers actually relate to the problem or not).
I just want to display one entry that has been set to yes.
{exp:weblog:entries weblog="studies" casestudy-featured="/Yes/" max="1"}
...
{/exp:weblog:entries}
That displays nothing. Change the max value to anything up to 4 and still nothing displays.
Change it to 5 and 1 entry displays. Change it to 6 and 2 display, 7 and 3 display. Anything above 7 and 3 display (the maximum number of entries set to Yes).
Hope that helps.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.