Using iTop

Creating your iTop

iTop Customization

"How to" examples

User Interface

Automation & Ticket management

Portal Customization

You are browsing the documentation for iTop 3.1 which is not the current version.

Consider browsing to iTop 3.2 documentation

Portal: How to add a create button

In this How to, we use the CreateBrick to add a quick request button.

How to add a create button
How To
Administrator, Integrator, Developer
Portal, Customization
iTop version:


What you will need to:

  • Know how to make an iTop extension and upgrade your system,
  • Have an iTop system with the demo data and the enhanced portal installed,
  • Have access to an account with enough rights to connect to the portal (usually this means having the Portal User profile).

Aim of this tutorial

In this tutorial, you will learn how to:

  • Add a brick to the default portal
  • Use the CreateBrick brick to make a button opening a creation form anywhere in the portal

 Create button

Step by step instructions

Creating the extension

First, we need to create an iTop extension that will alter the portal XML configuration to add a new brick. Check the Extension modules part from the customization guide (iTop Customization) if necessary.

  1. Name the extension as sample-portal-add-button.
  2. Remove the main.sample-portal-add-button.php file as we won't need any PHP code.

You should have the following structure:  Module structure

Changing the portal configuration

Now that we have the extension, we just need to make an XML delta and change the portal configuration to add the brick. Open the datamodel.sample-portal-add-button.xml file and paste the following code:

<?xml version="1.0" encoding="UTF-8"?>
<itop_design xmlns:xsi="" version="1.0">
    <module_design id="itop-portal" xsi:type="portal">
        <brick id="quick-new-user-request" xsi:type="Combodo\iTop\Portal\Brick\CreateBrick" _delta="define">
            <default>fa fa-bolt fa-2x fa-fw</default>
          <!-- Class that will be create created with the form -->
            <rule id="contact-to-userrequest"/>

This adds a brick to the portal that will :

  • Be placed after the other bricks in both the home page and the navigation menu as its rank is greater than those from other bricks.
  • Not be displayed on the home page.
  • Open the form in a modal dialog instead of redirecting to a whole page.
  • Make a form to create a object of class UserRequest.
  • With some presets from the contact-to-userrequest action rule.

Dictionary entry for the label of the button

Edit the file en.dict.sample-portal-add-button.php to add an entry for the label of the button, as shown below:

Dict::Add('EN US', 'English', 'English', array(
        'Brick:Portal:QuickNewUserRequest:Title' => 'Quick new request',

You can repeat the same operation for other languages.

Upgrading the system

Finally run an upgrade of your iTop system with the new extension option checked and access the portal. You should see the new Quick new request button on the navigation menu. Click it and a creation form will open.

 Et voilà !

The main difference with the default UserRequest creation process is that you don't have to go through the services catalog to choose the ServiceSubcategory; allowing you to create objects from anywhere in the portal.


You can find this extension with some example themes here:

3_1_0/customization/portal_howto_addbutton.txt · Last modified: 2023/07/21 10:19 (external edit)
Back to top
Contact us