Mark - What a great extension - especially for those of us with little query knowledge. Thank you!! I just ran into a situation where I need to include two different conditions like this:But as I quickly found out - it does not work. Can I have two conditions (notice the last two conditions: efront and esloc), but then look closer at esloc - I tried to include two different settings. Is this possible? If not I would love to add this as a feature request.{exp:weblog:entries weblog="events" show_future_entries="yes" limit="3" sort="asc" efront="=Yes" esloc="Delaware|Virginia"} <h2>title</h2> {body} {/exp:weblog:entries}
bump
ok try the latest version, it should work with multiple conditions, however it will combine them with an AND so you will get entries with efront=”yes” AND esloc=”delaware|virginia”. of course if you wanted to do delaware OR virginia you could use a “sql” attribute like so, to basically create a custom query
{exp:weblog:entries weblog="events" show_future_entries="yes" limit="3" sort="asc" efront="=Yes" sql1="(" esloc="Delaware OR Virginia" sql2=")"}
First of all: thank you so much for creating this Extension. It seems to work great. But is it possible that it’s not working with url segments?
I’m trying something like this:
{exp:weblog:entries weblog="events" orderby="title" sort="asc" disable="categories|pagination|trackbacks" genre="{segment_4}"}
And of course Genre is my custom field where authors can select from Metal to Classic. If this is not working with your extension I have two questions: - What can be done to make it work? - If there’s nothing that can be done about it, am I correct that the only way to program this is to have a huge list of conditional variable where I have to code each “genre” as a seperate possible query? - Or is there a clever MySQL query that could help me out?
ONce again, thank you very much!!
I can’t seem to get this to work. I’ve made the changes to mod.weblog.php as listed but it still doesn’t seem to work. Here’s my code:
{exp:weblog:entries weblog="member_job_listings" disable="categories|member_data|trackbacks" orderby="job_application_deadline" sort="asc" paginate="bottom" job_application_deadline="=3"}
job_application_deadline is the custom field. Right now I’m checking to see if it is ‘3’ - it’s a timestamp field so that shouldn’t return any results, but they all show. I’ve messed around with parameter order, as well as removing all the other parameters and still no go.
Any ideas?
EDIT: I’m an idiot. I hadn’t enabled the extension - it’s working great.
Thanks again Mark for your tireless efforts to extend EE!
This extension doesn’t seem to work if you’re selecting a random entry. What I would like to happen is select a random entry from those with a certain field filled - so it only chooses from the entries with information in that field.
Here’s my code:
{exp:weblog:entries weblog="member_spotlight" limit="1" orderby="random" disable="categories|pagination|member_data|trackbacks|custom_fields" member_spotlight_masthead="/.+/"}
Any way to fix this?
Linda, it should work, however, you would want to use the SQL syntax like so: field_name=’2.1%’. I believe that would do it.
Should it still work if it needs to fetch the number from a segment? I tried ‘{exp:weblog:entries weblog="{current_weblog}” 32_number_display=”{segment_3}%”}’ and that doesn’t seem to work.
Edited to add: Tested by adding the number straight in there too, but that doesn’t seem to work either. I did do the modifications to get the hooks in, but its possible I did something wrong there.
I took another look at the modifications needed for the hook, and the bit I am unsure about is the first one. It says to find the section ‘Do we need pagination?’ and to insert the code snipper right before that line. I am not sure if that means right before ‘Do we need pagination?’ or right before ‘if ($this->paginate == TRUE)’?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.