Hi all
I have a List & Search Type for Search Results which use multiple different content types and menu options. Because I also use different SEF menu variations in my site, the default option to inherit the menu item does not work.
The solution, as documented here:
https://www.seblod.com/resources/manuals/intermediate/creating-links
Seems perfect. What I have done is created two simple Text Fields with a default value of true. Then as per documentation I use JSON structure:
{"my_custom_field_id": "true"}=<menu item>
I then add this custom field to the List view.
This should work, but it does not. Digging deeper and debugging the code, I found that within the following code file:
./plugins/cck_field_link/content/content.php
From line #290 or therabouts the JSON is decoded and a check is made based on the above. My issue here is, that any of my Fields as associated to my list do not have a value field, only a default value. This means the following code will always fail:
if ( isset( $fields[$k] ) && $fields[$k]->value == $v )
Simply because we never have a value. I change the check property from value, to defaultvalue and success my custom Menu Mappings work!
I attach a screenshot of the debugger so you can get a better idea what I mean. None of the field objects have a value property at this point. I don't know if this is an issue with my configurations, or something else.
Screenshot here: https://i.imgur.com/c62V7m3.png
Best regards
Nick