Klenkes Posted November 8, 2023 Posted November 8, 2023 (edited) Finally I got some time to check out RockPageBuilder. I have great hopes! I got 2 fields that depend on the the state of a SELECT as radio buttons called button_linktype: The selectable options: 1=interne Seite 2=externe Website Outside of RPB I am able to do Show this field only if button_linktype=1 or button_linktype=2 to show or hide the depending field. In a RPB block this doesn't work! Neither PW backend nor frontend edit. I suspect this has something to do with the problem that I also cannot access a select option(->title) in my viewfile of a block: // 1=blue 2=black // Outside RPB this works as expected // Inside RPB this results in the PW Pagetitle instead of blue $some_var = $block->button_style->title; Tracy shows that all vars are there. It's a problem of accessing them. PW 3.0.226 | RPB 4.8.0 Edited November 29, 2023 by Klenkes Problem solved 1
bernhard Posted November 8, 2023 Posted November 8, 2023 Hi @Klenkes that's a bummer, I can confirm that bug. Seems I have never had that need in three years ? I'll have a look into that as soon as possible! Thx for your purchase and I hope you like it nevertheless ?
Klenkes Posted November 8, 2023 Author Posted November 8, 2023 Hi Bernhard. No rush! I have no current project ? and just checking the module out. So far I like it and will use it if a fitting project comes up. Then of course I will purchase the next bigger licence. 1
bernhard Posted November 8, 2023 Posted November 8, 2023 @Klenkes thx, I already found the source of the problem. Repeater fields have to be renamed because we can have many fields "foo" on one page, so they are named "foo_repeater123" and "foo_repeater456" and such. This conflicts with the showif condition, which would still be "foo=something". I'm wondering though why it does not work on the frontend when using ALFRED. Are you sure? For me it works in two senarios: 1) If I edit one block in a separate window: 2) In an ALFRED modal opened from the frontend It does not work on the backend view: Because in that last case we have fieldnames with the _repeaterXXX suffix. In the first 2 cases we open only the single page, so we don't have these suffixes. Can you confirm that it is the same for you? 1
Klenkes Posted November 8, 2023 Author Posted November 8, 2023 You are absolutely correct. It works in a separate window and on the frontend with Alfred. The not working frontend I probably imagined... Okay, I can live with that. That leaves me with the other problem with selects. How to access the more speaking title of an option in my blockname.view.php: // Options: 1=blue 2=black // Outside RPB this works as expected // Inside RPB this results in the PW Pagetitle instead of blue // $block->button_style gives me only the ID $some_var = $block->button_style->title;
bernhard Posted November 8, 2023 Posted November 8, 2023 1 hour ago, Klenkes said: That leaves me with the other problem with selects. How to access the more speaking title of an option in my blockname.view.php: I don't understand. It should be the same as with every other page. I just tried with an options field and $block->opt gives me this And $block->opt->title gives me "foo"
Klenkes Posted November 9, 2023 Author Posted November 9, 2023 That's weird... This is $block->button_style: $block->button_style->title returns "Über uns" aka the page title, where it should be: schwarz. (Same happens to the other Select in the block $button_size) Is there a dependency for the fieldtype like for textareas? The underscore in the name? ...grasping at straws...
bernhard Posted November 9, 2023 Posted November 9, 2023 Can you send me a zip + db dump of that project maybe?
bernhard Posted November 9, 2023 Posted November 9, 2023 22 hours ago, Klenkes said: That leaves me with the other problem with selects. How to access the more speaking title of an option in my blockname.view.php: For everybody else reading: This was actually a small bug in RockFrontend that is fixed now on the dev branch ? Thx for finding and helping me debug it @Klenkes
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now