try this:
{exp:weblog:entries weblog="events" Textd="="}
Technical response: the “=” means perform an exact match, without the “=” in quotes the generated sql would be LIKE “%%” which would match everything. Placing the “=” there makes the sql =”” which is what you’re looking for.
OK.
It looks like I’ve got to the same point as some other people and I’m trying to get this to work with segments. No dice.
A the moment I’ve got
{exp:weblog:entries weblog="v2_gigs" orderby="v2_gigs_venue|date" sort="desc|asc" v2_gigs_band1="{segment_3}"}
{entry_date format="%j%S of %M"} at {related_entries id="v2_gigs_venue"}{title}{/related_entries} {if v2_gigs_tour != ""}on the {v2_gigs_tour}{/if}
{/exp:weblog:entries}
Which gives me nothing when there is a valid segment 3.
Now ideally I need to check segment 3 against all of the below custom fields.
v2_gigs_band1
v2_gigs_band2
v2_gigs_band3
v2_gigs_band4
v2_gigs_band5
I’m basically trying to show a list of gigs that a band has played. Now the band can appear in any of the custom_fields because they may not always be on the same level of the bill. In a small venue they may headline (v2_gigs_band1) and in a large venue they may be an opener (v2_gigs_band5) or anywhere in between.
Thanks in advance for the help
DJ
—//—
HOLD FIRE on this one I’m trying to do it with reverse related entries and it might just be working 😊
Hey Mark.
Yeah got it working. :lol: I like trying to do things the hard way 😊
A lot simpler to do it with a reverse related entries and a single query.
It’d still be good to get confirmation that we can set a custom field with a segment.
Thanks as always for all your hard work.
I never did manage to get it working with the extension and a mySQL regexp to fetch a certain set of entries (it would be great if there was an option to match only from the start of the contents of a field), but now I’ve got another little task that I am hoping that it might be able to help me with. 😊
I am trying to do a sort of webring through EE, and one feature I need is next site & previous site. The way I had thought of doing this is having a ‘Next’ and a ‘Previous’ template that is setup to serve up a specific site depending on what is in the third segment. The third segment will hold the contents of the custom field called ‘ID’. So, if the third segment reads ‘4’ and you’re visiting the ‘Next’ template, the template should display the site where the ID is ‘5’. And if it was the ‘Previous’ template, it should display the site with ID ‘3’.
Is it possible to use the extension in such a way that you tell it to look in the custom field ‘ID’ for segment_3 + 1 or segment_3 - 1?
Mark,
I was scratching my head (and a little banging) tyring to get this working for weeks, but then found this forum and the mods that needed to be made to mods.weblog.php. Saved the day as our client presentation is tomorrow.
So is it possible to perhaps put the instructions or at least the need for the mods inside the extension so when it is viewed in the Extension Manager it shows up under “Documentation” or “Settings?”
Thanks for all the great work.
Figured out how to use the extension to get me custom field value +/- 1: the greater than/lesser than option and a limit of 1. So easy. This really is a great extension. 😊
Would it be possible, btw, to have an option to match the pattern against the start of the custom field value only? I think that’d solve my issue with selecting a range that starts with, for example, 2.1., and not getting 2.2.1. as well.
Hmm, okay, maybe I spoke a bit too soon:
{exp:weblog:entries weblog="{current_weblog}" 9_id="<{segment_3}" limit="1" disable="pagination" dynamic="off"}
The above code works as it should. When the segment is ‘5’, it gets me the entry with ‘4’ in the ‘9_id’ field.
However, the code below here does not work. Regardless of what the segment shows, I get the entry with ‘7’ in the ‘9_id’ field:
{exp:weblog:entries weblog="{current_weblog}" 9_id=">{segment_3}" limit="1" disable="pagination" dynamic="off"}
I believe I tried ‘1’, ‘2’ and ‘5’.
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’.
That was my thinking…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.