Quantcast
Channel: Pinegrow Web Editor
Viewing all articles
Browse latest Browse all 147

Using partials for Pinegrow UI dialogs

$
0
0

In Pinegrow we use partials for editing dialog boxes.

Take a look at Open as partial… dialog box:

pgpartials1

Instead of hard coding the layout of the dialog in the code, we have a special HTML file where this and similar dialogs are defined. This makes it super easy to edit them with Pinegrow:

pgpartials2

With the help of Save partial action we than export each dialog to its HTML partial file (the file contains just the HTML code of the dialog). For example, we export the Open as partial dialog into open-partial.html file:

pgpartials3

Then in the code that creates the dialog we just use a simple function that loads the partial through Ajax call and use the returned HTML to construct the dialog box:

pgpartials4

And that’s it!

Of course, you would need to define your own function for loading the partial into your app. It can be a simple Ajax get call.

The post Using partials for Pinegrow UI dialogs appeared first on Pinegrow Web Editor - Documentation and Tutorials.


Viewing all articles
Browse latest Browse all 147

Trending Articles