Jérémy
Hello,

I don't find documentation about "as-element" property of a module in your documentation. What is the utility ?
(in config.php, $config['as_element'] = 0 or 1).

I try to add an admin panel in picture module and it works if i set this value to 0. But i lose the "change" button.

Thanks,

Jérémy


Comments for Configuration on modules

Microweber Team   2014-03-26 09:05:47
Hi Jeremy,

The $config['as_element'] property turns your module into static HTML.

This is used in the title, picture, text and multiple columns modules.

When you drop those modules they produce static html as if you have pasted the html in the site.

The static html code does not have "settings" . Use this property for example if you want to make HTML snippets for reuse.
Jérémy   2014-03-26 12:51:01
Hi,

Ok.

So how is it possible for me to add an admin panel for these elements (using admin.php file) ?

In fact, i want to have possibility to specify for each element if he will be seen on smartphone, tablet or desktop using responsive design.
For example, with this admin settings, i will be able to say that a specific image will be display in tablet and desktop and not on smartphone.
And this configuration would be the same on title, text, image, video, ...

Any ideas ?

Thank you,

Jérémy
Microweber Team   2014-03-26 12:51:01
Hi Jeremy we are writing documentation on this.

What module are you trying to make so we can add this es example
Jérémy   2014-03-26 14:05:26
First, i'm trying to add an admin panel for responsive design on Picture module.
Microweber Team   2014-03-26 14:05:26
Hi Jeremy, are you going to use only a single picture or you want to have picture gallery with many pictures
Jérémy   2014-03-26 14:05:26
Picture gallery is not an element, so i don't have problems to add an admin tab (existing already). I want to add an admin panel on a Picture Element (single picture).

Thanks.
Microweber Team   2014-03-27 08:15:34
Hi Jeremy,

There is no way this to be done via the dropped element

You can somehow make a JavaScript plugin/controller to show a button when you move your mouse on the picture.

In your module folder if you create functions.php and put this

event_bind('mw_after_editor_toolbar', 'my_image_editor');

function my_image_editor() {
print '<a>Image editor</a>';
}

This will print a button in the live edit toolbar. There you can also add scripts, etc.

Anyway expect this in the docs, we are writing them now
Microweber Team   2014-03-27 08:15:34
Jeremy if you want you can come in the chat https://microweber.com/irc

There we can chat in more details
You have to log in or register to post a comment: