# Pagemanager_XH - a CMSimple_XH Plugin

Pagemanager_XH simplifies the administration of pages of a CMSimple_XH installation. This plugin is comparable to the Menumanager plugin with regard to functionality, but by using a treeview it allows for better handling of websites with many pages. With Pagemanager_XH it is also possible to rearrange whole submenus.

Please do read this documentation before you encounter any problems!

## Requirements

Pagemanager_XH is a plugin for CMSimple_XH. Pagemanager_XH 2 requires CMSimple_XH ≥ 1.6. Additionally it requires the jQuery4CMSimple plugin, which is already contained in the standard download of CMSimple_XH since 1.4.1.

back to top

## Installation

The installation is done as with many other CMSimple_XH plugins. See the CMSimple_XH wiki for further details.

1. Backup the data on your server.
2. Unzip the distribution on your computer.
3. Upload the whole directory pagemanager/ to your server into CMSimple_XH's plugins/ directory.
4. Set write permissions to the subdirectories css/, config/ und languages/.
5. Browse to Pagemanager's administration (Plugins → Pagemanager), and check if all requirements are fulfilled.

back to top

## Settings

The plugin's configuration is done as with many other CMSimple_XH plugins in the website's back-end. Select "Pagemanager" from "Plugins".

You can change the default settings of Pagemanager_XH in "Config". Hints for the options will be displayed when hovering over the help icon with your mouse.

Localization is done in "Language". You can translate the character strings to your own language, or customize them according to your needs.

The look of Pagemanager_XH can be customized in "Stylesheet". Particularly, you should look for the settings that are commented out. Maybe you like to try them.

back to top

## Usage

This plugin is used exclusively in CMSimple_XH's backend. It is started by clicking "Pages" in the administration menu. Now you see a view of your site's structure, that basically resembles the sitemap. However, it is possible to open and close page branches in this view, so you don't loose overview of even extensive websites. You can open or close those by clicking on the small markers left to the page, or by double clicking their titles.

Above the tree view of your website's pages you find Pagemanager_XH's toolbar. When hovering over the buttons, popups which describe the tool's function will be shown. The two leftmost buttons allow to expand resp. collapse the tree view of your website. The toolbar is particularly useful, if your browser doesn't allow Pagemanager_XH's context menu to popup.

Rearrangement of the structure of your pages is done by drag & drop; when dragging according markers are shown, so you can see where the page will be inserted when dropping it. If it is not possible to drag to a certain page, because it would result in e.g. a recursive page structure, or the nesting level would be greater then your configured "menu levels", this will be shown by a red cross or you will simply be not allowed to drop there. So carefully watch the markers, until you get a feeling how the drag&drop works. If you hold down the CTRL key while dragging, the result will be a copy instead of a move operation.

Examples of drag&drop move operations
during move | after move
--- | ---

Additional functionality is available in the toolbar or through the context menu (click the right mouse button on the page). You can create new pages, rename or delete existing ones, and use the common clipboard functions as an alternative to drag & drop. If a paste operation will result in a recursive page structure, e.g. by copying a page into itself, it will be silently ignored. If you delete the selected page, all it's subpages will be deleted as well.

The checkboxes to the left of the pages allow you to view and change their publishing state. You can configure if they refer to 'Published?' or 'Show in menu?'. If this setting is empty (what is the default), no checkboxes are shown. Duplicate headings are shown as in the navigation menu. If you hover over them with the mouse pointer, the real page headings will be displayed in a popup. Newly created pages will be shown with a different icon, to better distinguish them from old pages.

The possiblitly to copy whole substructures might not seem resonable at first sight, but it could be useful, e.g. if you've got a gallery on those pages, because all content and meta data of these pages will be copied too. So it is possible to adjust details afterwards.

Note that there is no undo or cancel functionality. If you've totally mixed up your page structure simply refresh your browser's view without saving before. Your old page structure will be presented again.

back to top

## Limitations

### Irregular page structures

It is possible that your existing website has an irregular page structure. E.g. after an <h1> heading immediately follows an <h3> heading without an <h2> heading in between. Such irregularities in your page structure might have unintentionally been introduced while you were manually editing the page structure in the editor (e.g. changing headings, deleting pages), but it is possible that this feature is used by your system for a special purpose.

Anyway, Pagemanager can't handle such irregular page structures, and if it detects it, it shows a message and offers you to fix it. If the irregularity was introduced accidentially, you may safely confirm and go on. Otherwise (or if you're not sure) take a backup of the contents file, before you proceed, save the fixed structure from Pagemanager, and carefully check, if everything still works as expected.

### jQuery

Pagemanager_XH may not work in installations with jQuery dependent plugins/addons/templates that don't use jQuery4CMSimple, but import their own jQuery library. This won't get fixed (as it's not possible to fix it in all cases), because all developers are advised to use only jQuery4CMSimple together with all their jQuery based code for CMSimple_XH. So offending extensions should be updated!

back to top

## License

Pagemanager_XH is licensed under GPLv3.

© 2011-2013 Christoph M. Becker

back to top

## Credits

This plugin uses jsTree. Many thanks to Ivan Bozhanov, the developer of this library.

jsTree uses jQuery. Many thanks to all developers of this JavaScript framework.

jQuery is made available for CMSimple_XH by jQuery4CMSimple. Many thanks to Holger Irmler, the author of this plugin.

The plugin icon is designed by Everaldo Coelho. Many thanks for publishing this icon under GPL.

This plugin uses free applications icons from Aha-Soft. Many thanks to making these icons freely available.

Many thanks to the community at the CMSimple_XH forum for tips, suggestions and testing. Particularly I want to thank "snafu", who's early feedback encouraged me to go on with Pagemanager_XH. Many thanks to Ulrich, who found a severe bug (and some minor issues) and helped to fix it by providing detailed information on what's happened. And many thanks to Gert for some bugfixes and translations and many valuable hints. I also want to thank Martin, whose report about problems with the context menu inspired the addition of the toolbar, and Tata who inspired the "scrolling" toolbar.

And last but not least many thanks to Peter Harteg, the "father" of CMSimple, and all developers of CMSimple_XH without whom this amazing CMS wouldn't exist.

back to top