Search

Nils, thanks a lot. Didn't notice the "Symphony 2.3 only" warning.

In Symphony 2.3 I'm trying to negate whilst filtering on a Select Box Link field on another data source's output parameter:

not:{$ds-versions.system-id}

I've had a search and read of the forum and have also tried not-regexp:{$ds-versions.system-id}.

There may be none, one or multiple id's output by $ds-versions the SBL field.

I'm not getting the expected results. What am I doing wrong?

Thanks, @designermonkey. I'm still struggling with this, though.

Using either

not:{$ds-versions.system-id}

or

sql-null-or-not:{$ds-versions.system-id}

works when only one item out of my two in the SBL field being filtered on is selected, but if both are selected, entries which "should" be filtered out are still being included in the data source output.

It's as if when the SBL field is outputting more than one id, the comparison isn't able to be made with my filter value.

Sample output from an entry with both items in the hide-on SBL field selected which I'm trying to filter against $ds-versions.system-id when this SBL is included in the data source output:

<entry id="45">
    <title handle="advance-organisers">Advance Organisers</title>
    <hide-on>
        <item id="2" handle="m" section-handle="how2-versions" section-name="HOW2: Versions">m</item>
        <item id="1" handle="t" section-handle="how2-versions" section-name="HOW2: Versions">t</item>
    </hide-on>
</entry>

The $ds-versions.system-id data source output parameter:

<ds-versions.system-id>
    <item handle="1">1</item>
</ds-versions.system-id>

My suspicion is that because the SBL item with an id of 2 is output before the one with an id of 1, the 1 isn't being matched and so isn't filtered out...

Is the above approach a legitimate approach to filtering with negation on a SBL field, or do I need to be doing it differently?

As mentioned, it seems to work when only one item is selected (this item is not included in the output), but not when both are selected.

Is there a way to filter SBL field in the backend?

For example I've got a section articles with a checkbox: Publish. I want to give the client the possibility to display the teaser of the articles in the sidebar but limited by the articles where the checkbox Publish is checked.

Currently, this is one of the limitations I'm afraid. We should be starting work on fixing things like this soon though.

It's one of my biggest bug-bears with the SBL. SSM tackled this though if you want to use that?

Ty for the answer @designermonkey. I like SSM but since the future is unsure for this project I choose for SBL.

Solution for now is to filter in the template. If "publish" isn't checked, nothing is shown so the client is aware he choose an article which isn't published.

Is there a way of displaying the link fields actual value instead of the handle in the XML?

For example I have a section (called chart-track) which has 2 select box link fields, one for artist and one for track:

<entry id="38">
  <artist>
    <item id="33" handle="aerosmith" section-handle="artist" section-name="Artist">aerosmith</item>
  </artist>
  <track>
    <item id="36" handle="dont-wanna-miss-a-thing" section-handle="tracks" section-name="Tracks">dont-wanna-miss-a-thing</item>
  </track>
  <thumbs-up>1</thumbs-up>
  <thumbs-down>0</thumbs-down>
  <total handle="1">1</total>
</entry>

The value of the item in both select box fields seems to be the handle and not the value e.g. aerosmith instead of Aerosmith.

I have also noticed in the backend that the drop down boxes contain item handles where what I really want is the item values.

Is this a bug or the intended operation? I'm running 2.3.1 and version 1.2.5 of select box link field.

If it is not a bug can someone tell me how I might modify the extension?

Thanks

@davecoggins Should actually include the value, handle is only provided in the handle attribute. Had this issue once when using Text Box field as value for Select Box Link, but should be already fixed in 2.3.2beta and the latest version of Text Box field.

Thanks @jensschrebi you're right, it is caused by textbox field.

... and the latest version of Text Box field

NB: The latest Text Box field release 2.3.1 is not compatible with the current ML Text field version, which is of later release. But I didn't tested it thoroughly.

Is there currently a way to switch off the limit of the returned results in a section with SBL field? i.e setting the value limit to 0 would return all entries right?

Just to be clear, am I right in thinking there is currently no way to order select box link menus alphabetically?

Correct, I believe it is logged as a ticket though :)

@moonoo2 I’ve been asking this question here. For comfort’s sake here’s Johns reply:

Me: So is setting it to 0 deactivate it? Or would I rather have to use something like 999999?

John: 0 would show 0 entries, but still have the links for the section visible, 999999 would allow that many links.

There is no deactivating it as it's a core feature now.

That's not correct, 0 will deactivate the feature.

Nevermind, thought you were talking about Associations

Oh wait you were talking about associations, my above comment still stands, see also here

is it possible for a future release to filter results that are going to appear in the select box value, by a certain field in the linked section?

i attached an example, where Articles entries category can only be "Electronics"; since is filtered by it's status in linked section Categories

thank you

Attachments:
SBL_prop.png

After upgrading to version 1.31 i get an error in the backend when i want to see the entries of a section with the Select Box Link field:

Symphony Fatal Error: Call to undefined method FieldSelectBoxLink::prepareReadableValue() An error occurred in /extensions/selectboxlinkfield/fields/field.selectboxlink.php around line 629

Which Symphony version? (Compatibilty table)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details