Custom Pages

3 posts by 3 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 28, 2010   (RSS)

By pothompson - May 27, 2010

I've written a small plugin to allow programmers to write custom pages to add to the CMS Builder interface and hope it's Ok to share it here.

I'm using it because my customer wants a customised page for displaying order information and I think it's nicer to have this all under the CMS interface.

To activate it, copy the attached file into the plugins directory underneath the CMS Builder installation directory, then from the Admin -> Plugins menu, click activate next to the plugin called 'Custom Pages'.

To create a custom page, add the new .php file to the directory lib/menus. You can use the existing home.php as a starting point.

To access the new custom page from the CMS Builder main menu, you need to create a new 'Text Link' menu item as follows:
1. Create a new editor under Admin -> Section Editors. The Menu type should be 'Text Link' under the Advance menus dropdown.
2. Set Menu Name to be whatever you like, this will be the text displayed in the menu. Leave Table Name as the default.
3. From the list of editors, 'modify' the new one just added and set the 'Link Url' to be as follows:
admin.php?menu=custom&custompage=CustomPageName' target='_parent

CustomPageName should be the name of your new php file without the php extension. E.g. if your new file in lib/menus is called show_orders.php, the Link Url should be set to admin.php?menu=custom&custompage=show_orders' target='_parent

The target='_parent prevents the page launching in a new window.

As I said, I'm hoping it's OK to post this here, but if not then please remove it.

Paul.
Attachments:

custompages.php 1K

Re: [pothompson] Custom Pages

By Dave - May 27, 2010

Paul,

Nice work, thanks for sharing! :)

Eventually I want to update the add-on section to allow developers to upload their own plugins but I haven't got around to that yet!
Dave Edis - Senior Developer
interactivetools.com