Content management tools

If a user is logged in to the administration panel, ImpressPages automatically adds admin navigation bar at the top of the page and, if required, a widget bar.

In order for this to happen, you should add <?php echo ipHead() ?> and <?php echo ipJs() ?> to each of your theme's layout files.

Administration page HTML is loaded using AJAX. So, if you want to access admin panel from JavaScript, you should catch ipAdminPanelInit or ipContentManagementInit event (see the JavaScript event table bellow).

ImpressPages adds jQuery by default. You shouldn't add your own version of jQuery. If you do so, you can break the administration panel.

Content editing related JavaScript events

Event Scope Comment Data
ipAdminPanelInit document

Triggered after admin panel is initialized

ipContentManagementInit document Triggered after widget bar is initialized. See bellow for more details.
ipGoogleMapsLoaded document Google Maps API is loaded. 
ipWidgetDeleted document Widget deleted widgetId
ipWidgetSaved document Widget data changed data
ipWidgetAdded document New widget added widgetId, widget
ipWidgetMoved document Widget moved widgetId
ipWidgetMapInit widget instance Map widget initialization map, marker
ipWidgetReinit document Triggered every time, when widget objects are reinitialized.

Content editing functions

Content editing functions can be accessed in ipContent scope. Example usage:

ipContent.addWidget('main', 'Heading', 0); //adds the Heading widget at the top of the main block

Here is a full list of functions available in ipContent scope:

Method name Parameters Comment
createWidget block, widgetName, position, callback
createWidgetInsideWidget widgetName, targetWidgetId, position, callback Used to split existing text widget
createWidgetToColumn widgetName, targetWidgetId, position, callback
createWidgetToSide widgetName, targetWidgetId, leftOrRight, callback A new column will be created
deleteColumn columnsWidgetId, columnName, callback
deleteWidget widgetId, callback
moveWidget widgetId, position, block, callback
moveWidgetInsideWidget sourceWidgetId, targetWidgetId, position, callback Used to move a widget inside an existing text widget by spliting it in two parts
moveWidgetToColumn sourceWidgetId, targetWidgetId, position, callback
moveWidgetToSide sourceWidgetId, targetWidgetId, leftOrRight, callback A new column will be created
splitWidget widgetid, position, callback Used to split a text widget in two separate widgets.
updateWidget widgetId, widgetData, regeneratePreview, callback Set new data for the widget

Disable widget management (since 4.5.2)

You can disable content management by adding ?'disableManagement'=1 at the end of the URL. The user will stay logged-in, but won't see management tools in that particular page view.

comments powered by Disqus