volaticus
Forum Replies Created
-
Still encountering this for what it’s worth– tried installing after a few days since I figured that would be beyond the update period, it seemed to be throwing the same error after.
Reinstalled the plugin and no longer have this issue. Not sure exactly what the problem was, but this is resolved for me at this time.
After troubleshooting, this was determined to be another plugin interfering with the output, please disregard.
Forum: Plugins
In reply to: [Custom Block Builder - Lazy Blocks] List Helper FunctionAwesome, thank you for your help!
Forum: Plugins
In reply to: [Custom Block Builder - Lazy Blocks] List Helper FunctionSure. The below is the exported JSON from the block I’m using:
[ { "id": 184, "title": "Account Tile", "icon": "<svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M18 4H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H6V6h12v12z\" \/><\/svg>", "keywords": [], "slug": "lazyblock\/account-tile", "description": "", "category": "lazyblocks", "category_label": "lazyblocks", "supports": { "customClassName": true, "anchor": false, "align": [ "wide", "full" ], "html": false, "multiple": true, "inserter": true }, "ghostkit": { "supports": { "spacings": false, "display": false, "scrollReveal": false, "frame": false, "customCSS": false } }, "controls": { "control_20ba2b4b9b": { "type": "text", "name": "caption", "default": "", "label": "Caption", "help": "", "child_of": "control_acca27475c", "placement": "content", "width": "50", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_2819eb4ea1": { "type": "url", "name": "link-url", "default": "", "label": "Link URL", "help": "", "child_of": "control_acca27475c", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_53b9df42ca": { "type": "image", "name": "icon", "default": "", "label": "Icon", "help": "", "child_of": "control_acca27475c", "placement": "content", "width": "50", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "preview_size": "medium", "placeholder": "", "characters_limit": "" }, "control_7e29014f6c": { "type": "text", "name": "title", "default": "", "label": "Title", "help": "", "child_of": "", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_9f3aba4c62": { "type": "text", "name": "brief-description", "default": "", "label": "Brief Description", "help": "", "child_of": "", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_3068dc46ff": { "type": "classic_editor", "name": "features", "default": "", "label": "Features", "help": "", "child_of": "", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_64384a444c": { "type": "repeater", "name": "ctas", "default": "", "label": "Calls to Action", "help": "", "child_of": "", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "rows_min": "0", "rows_max": "2", "rows_label": "CTA {{#}} - {{cta-text}}", "rows_add_button_label": "", "rows_collapsible": "true", "rows_collapsed": "true", "placeholder": "", "characters_limit": "" }, "control_76e9474010": { "type": "select", "name": "cta-style", "default": "cta-btn", "label": "Call to Action Style", "help": "", "child_of": "control_64384a444c", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "choices": [ { "label": "Solid Button", "value": "cta-btn" }, { "label": "Ghost Button (Teal)", "value": "cta-ghost-teal" }, { "label": "Half Underlined Link (Teal)", "value": "cta-lnk-teal" } ], "allow_null": "true", "multiple": "false", "output_format": "", "placeholder": "", "characters_limit": "" }, "control_78d9e84efb": { "type": "url", "name": "cta-link", "default": "", "label": "Call to Action Link", "help": "", "child_of": "control_64384a444c", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_bda8a44e00": { "type": "text", "name": "cta-text", "default": "", "label": "Call to Action Text", "help": "", "child_of": "control_64384a444c", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "placeholder": "", "characters_limit": "" }, "control_f488674e92": { "type": "checkbox", "name": "speedbump", "default": "", "label": "Speedbump Link", "help": "", "child_of": "control_64384a444c", "placement": "content", "width": "50", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "checked": "false", "alongside_text": "", "placeholder": "", "characters_limit": "" }, "control_cb8b894441": { "type": "checkbox", "name": "new-tab", "default": "", "label": "Open Link in New Tab", "help": "", "child_of": "control_64384a444c", "placement": "content", "width": "100", "hide_if_not_selected": "false", "save_in_meta": "false", "save_in_meta_name": "", "required": "false", "checked": "false", "alongside_text": "", "placeholder": "", "characters_limit": "" } }, "code": { "output_method": "html", "editor_html": "", "editor_callback": "", "editor_css": "", "frontend_html": "<div class=\"account-tile-single\">\n <div class=\"tile shadow-box\">\n <div class=\"tile-inner\">\n <div class=\"caption\">\n {{#if title}}<h3 class=\"title\">{{title}}<\/h3>{{\/if}}\n {{#if brief-description}}<h4 class=\"subtitle\">{{brief-description}}<\/h4>{{\/if}}\n {{#if features}}\n <div class=\"body\">\n <code>features</code>\n <\/div>\n {{\/if}}\n {{#if ctas.length}}\n <ul class=\"actions\">\n {{#each ctas}}\n {{#if cta-text}}\n <li><a class=\"{{cta-style}}{{#if speedbump}} speedbump{{\/if}}\"{{#if new-tab}} target=\"_blank\"{{\/if}} href=\"{{cta-link}}\">{{cta-text}}<span class=\"visuallyhidden\"> - {{title}}<\/span><\/a><\/li>\n {{\/if}}\n {{\/each}}\n <\/ul>\n {{\/if}}\n <\/div>\n <\/div>\n <\/div>\n<\/div>", "frontend_callback": "", "frontend_css": "", "show_preview": "always", "single_output": false }, "condition": [] } ]
- This reply was modified 3 years, 3 months ago by volaticus.
Forum: Plugins
In reply to: [Custom Block Builder - Lazy Blocks] List Helper FunctionUsing length still outputs 1 empty record. So if I’m doing:
{{#if repeater_control.length}} <ul> {{#each repeater_control}} <li><a class="{{link-class}}" href="{{link}}">{{link-text}}</a></li> {{/each}} </ul> {{/if}}
I still get just:
<ul></ul>
as an output. It will still return a single blank record and have a length even if none of the properties of the repeater are filled in / if there is no row added to the repeater control. I do have a dropdown control in the repeater as well, the above is kind of truncated to give you an idea of the structure, so my only guess is that if the dropdown had a default value, that value is always present. But it’s strange to me that even if no row is present, e.g.; 0 items have been added to that specific repeater, it always contains at least 1 record.