How would you suggest that orderby= and sort= be set for the greater than and lesser than setups? What I find odd is that using lesser than seems to work just fine. I tested that with several different values as the segment, and it worked each time.
We’ll my thinking is that if you say you want numbers less than 5 you’ll get 1,2,3 and 4. However you only want 4 (I think), so to to get that you’d want the sort to be DESC (which I think is the default).
If you want numbers greater than 5 you’ll get 6,7,8,9 and 10 (assuming 10 is your largest entry). Limiting this by one gives you 10 (if they’re in DESC order). Make it ASC order when your choosing a greater than and you’ll get the entry directly following ‘5’.
Hoping for some quick help here if possible. Can someone walk me through how to use this to show all entries that start with a certain letter? I need to allow someone to show all companies that start with A for instance. I need to also allow them to combine that with other criteria that are all set in custom weblog fields.
Hmm - also this doesn’t seem to work: company_member_discount=”/.+/”
That is not returning anything, even though there are entries that have text for company_member_discount. Is that the right search for any entry that has a value in the field? I pulled it from earlier in this thread…
I can’t get to to work with segments. merk is the name of the customfield and Leolux is the variable chosen from a dropdown list. I’m confused that it doesn’t work because the code I use is pretty straightforward imo. I see no entries at all, while I checked that at least some of them have that customfield variable.
Doesn’t work either. I’ve no idea where it fails. :(
Don’t gave to hook anything inside my mod.weblog.php because I don’t use pagination and relationships anyway, right?
Doesn’t work either. I’ve no idea where it fails. :(
Don’t gave to hook anything inside my mod.weblog.php because I don’t use pagination and relationships anyway, right?
I had to modify mod.weblog.php before it would work even when not using pagination. I bet that fixes it for you.
Thanks for helping. As soon as I modify the mod.weblog.php I get an sql error - feeling like a noob now. After putting back the original it was gone. I’m sure I inserted the two codesnippets correct.
MySQL ERROR:
Error Number: 1064
Description: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE t.entry_id !='' AND t.entry_date < 1172932539 AND (t.ex
Query: SELECT t.entry_id FROM exp_weblog_titles AS t LEFT JOIN exp_weblogs ON t.weblog_id = exp_weblogs.weblog_id LEFT JOIN exp_members AS m ON m.member_id = t.author_id INNER JOIN exp_weblog_data AS d ON t.entry_id=d.entry_id AND WHERE t.entry_id !='' AND t.entry_date < 1172932539 AND (t.expiration_date = 0 || t.expiration_date > 1172932539) AND exp_weblogs.is_user_blog = 'n' AND t.weblog_id = '14' AND t.status = 'open' ORDER BY t.sticky desc, t.entry_date desc LIMIT 0, 100
Man, I feel like a complete idiot today. Have not been able to get anything going including this extension. More accurately I see it’s effects, but my queries seem not to work correctly. I want to pull entries for which a certain custom field (text input) has something in it. The only entry that has anything in it at the moment has a * in it, but that should be immaterial.
Just a quick note for people coming after. There were a lot of unanswered questions about using segments with this extension. I think most peoples’ problems were with getting it to work in the query part of their tag, and I haven’t needed to try that yet, but it did work in this form for me:
I can’t get any results when a field has a / in it. I’m not really up on REGEX, but a quick search shows \ as a reserved character, but not /, so I don’t think it has to do with that?
So for example if I search for “Advertising/Marketing/Public Relations” I get no results (when there are results).