Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings select box #65

Closed
billiemead opened this issue Dec 19, 2020 · 1 comment
Closed

Settings select box #65

billiemead opened this issue Dec 19, 2020 · 1 comment

Comments

@billiemead
Copy link

billiemead commented Dec 19, 2020

Hi,

I tried to follow this for the expected format:

https://github.com/HansSchouten/PHPageBuilder/blob/master/src/Modules/GrapesJS/Block/BlockAdapter.php#L136

"settings" => [
    "nav-theme" => [
        "type" => "select",
        "label" => "Nav Theme",
        "name" => "navtheme",
        "options" => [
            'id' => 0, "name" => "nav-light",
            'id' => 1, "name" => "nav-dark",
        ]
    ],
]

But am getting an error so I must have it wrong?

And how do I use a .jpg file for thumbnail preview please???

@HansSchouten
Copy link
Owner

HansSchouten commented Dec 19, 2020

Instead of using a custom image that you should create and keep up-to-date, I would suggest to render them automatically.

I see the issue, it should be:

"settings" => [
    "nav-theme" => [
        "type" => "select",
        "label" => "Nav Theme",
        "name" => "navtheme",
        "options" => [
            ['id' => 0, "name" => "nav-light"],
            ['id' => 1, "name" => "nav-dark"],
        ]
    ],
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants