Search

Well, then … *sigh*

I’m sure someone has asked this before and there was a thread describing a way to do this. I can’t remember :-S

Your best bet is to install both fields and compare the structure of the two field tables (sym_section_link and sym_select_box_link?). You might find they are so similar you can swap things around at the database level without scripting.

It looks like the sym_entries_data_{id} tables for both use the same structure: id, entry_id, relation_id; so your data doesn’t need to change.

You’ll also want to look into the sym_sections_association table for your field IDs forming the relationships. Be sure to change any cascading_deletions to “no”, since the Section Link used “yes” as its default but SBL uses “no”.

I converted one sectionlink to Mediathek by copying database values. Thanks for the tip with the sym_sections_association table.

Any reason canPrePopulate() is not true? Imagine any problems setting it to true?

What use case would you need to create a relationship on a field that is already used in a relationship? If Section A includes a SBL named Field A that links to Field B in Section B, if you created another SBL in Section C, you would link it to Field B directly, rather than going via Field A. Does that make sense? Just trying to work out the relationship structure you’re trying to model.

Spot on Nick. My original thought was that the interface would be better to have the link from Section C to Section B but as I started to work it out I realized it was more convenient to link back to Section A.

I added a few missing strings and language files for Dutch, German, Portuguese and Russian to this extensions. It would be great if the translation contributors could proof-read and complete their translations and if these changes could be integrated in the main repository.

http://github.com/nilshoerrmann/selectbox_link_field

Select Box Link Field updated to version 1.14 on 10th of January 2010

using this field, if you pass in a value to filter by, it will return all entries with that value, correct?

say that i have an entry that has the categories: symphony, xsl, and development that were all created with this field. and then i want to filter by category, but only pass in one value for to filter by, say like xsl. Now, if i want to pull in all entries with the xsl tag, just passing the xsl value will return this entry even though it still has two other categories attached to it, correct?

Yes, I believe that’s correct.

if that is the case, i must be missing a step somewhere b/c when i do do it that way, i get no results found when I know for a fact there is at least one entry for my filter. anyway to step through and debug this?

i have an entry that has the categories: symphony, xsl, and development

So you’re using a Select Box field, not a Select Box Link field? Unless you’re using the latest version of the Select Box Link, you can only filter it by the ID of the related entry, not the text value.

But it sounds like you’re using the more straightforward Select Box?

Unless you’re using the latest version of the Select Box Link, you can only filter it by the ID of the related entry, not the text value.

Select Box Link 1.14 allows you to filter by a handle value. See Commit.

I’m assuming wtdtan is using the latest build of Symphony (2.0.6) which bundles SBL version 1.10.

Select Box Link Field updated to version 1.15 on 14th of January 2010

@nick - fresh install of 2.0.7 and just updated to alistair’s 1.15 version. this seems to work for somethings but not others (which doesn’t make sense, so it could be my implementation).

For my projects section, i have it filtered like this (which returns results): type (select box link) using $cat publish: ‘yes’

then for my posts section i have it filtering like this (which does not return results): categories (select box link) using $cat publish: ‘yes’

both instances don’t require any certain url param, they are sorted differently (but i don’t see that as a retrieval issue) and just output different nodes. but still, the posts section returns no results.

anything else i can check that i may have missed?

anyone have any other ideas for troubleshooting my filter issue?

This could be due to the added filtering by handle.

If you replace if(!is_numeric($value)){ on line 373 with: if(!is_numeric($value) && $value != 'no' && $value != 'yes'){, does that fix the issue?

@dutchmen - that didn’t turn out to be the issue. I set a $pg param in Show page ## of results, but since i wasn’t passing in the $pg param in the url, it wasn’t showing anything. i defaulted it to $pg:1 so it would always at least fall to page 1, which (after much frustration) finally returned something.

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