Menu

How to use Embedded webpage

2022-12-12
2023-01-12
  • Javier Galdeano Rodríguez

    Hey! I was following this tutorial to include external webpages: https://www.itophub.io/wiki/page?id=extensions%3Aitop-portal-url-brick

    I've already configured the URL-brick (or atleast that's what I think), and I'm trying to include it in the Portal. Thing is that nothing is being changed on the interface, so I was wondering if I'm doing something wrong. Following my problem, I've also this doubt: What's exactly a brick?

    Anyways, this is my code:

    1.- datamodel.itop-portal-url.brick.

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.3">
        <module_designs>
            <module_design id="itop-portal" xsi:type="portal" _delta="must_exist">
                <bricks>
                    <brick id="url-to-synchro" xsi:type="Combodo\iTop\Portal\Brick\UrlBrick">
                        <parent>Sincronizacion</parent>
                        <rank>150</rank>
                        <title><default>www.google.es</default></title>
                    </brick>
                </bricks>
            </module_design>
        </module_designs>
    </itop_design>
    

    2.- module.itop-portal-url.brick.

    <?php
    
    /**
     * Copyright (C) 2013-2020 Combodo SARL
     *
     * This file is part of iTop.
     *
     * iTop is free software; you can redistribute it and/or modify
     * it under the terms of the GNU Affero General Public License as published by
     * the Free Software Foundation, either version 3 of the License, or
     * (at your option) any later version.
     *
     * iTop is distributed in the hope that it will be useful,
     * but WITHOUT ANY WARRANTY; without even the implied warranty of
     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     * GNU Affero General Public License for more details.
     *
     * You should have received a copy of the GNU Affero General Public License
     */
    
    /** @noinspection PhpUnhandledExceptionInspection */
    SetupWebPage::AddModule(
        __FILE__, // Path to the current file, all other file names are relative to the directory containing this file
        'itop-portal-url-brick/1.1.1',
        array(
            // Identification
            //
            'label' => 'Embedded webpage in iTop portal',
            'category' => 'business',
    
            // Setup
            //
            'dependencies' => array(
                'itop-portal-base/1.0.0',
                'itop-portal/1.0.0',
            ),
            'mandatory' => false,
            'visible' => true,
    
            // Components
            //
            'datamodel' => array(
                'compatibilitybridge.php',
            ),
            'webservice' => array(
    
            ),
            'data.struct' => array(
                // add your 'structure' definition XML files here,
            ),
            'data.sample' => array(
                // add your sample data XML files here,
            ),
    
            // Documentation
            //
            'doc.manual_setup' => '', // hyperlink to manual setup documentation, if any
            'doc.more_information' => '', // hyperlink to more information, if any 
    
            // Default settings
            //
            'settings' => array(
                // Module specific settings go here, if any
            ),
    
            'itop-portal' => array(
                'bricks'=>array(
                    'url-to-synchro' => array(
                        'url' => 'https://www.google.es'
                    ),
                ),
            ),
        )
    );
    

    3.- Datamodel.sample-add-menu

        <brick id="Sincro PHP" xsi:type="Combodo\iTop\Portal\Brick\UrlBrick">
            <fullscreen>true</fullscreen>
            <url>//www.google.es</url>
        </brick>
    
     
  • Pierre Goiffon

    Pierre Goiffon - 2023-01-12

    Hello,
    In your datamodel.itop-portal-url.brick file, on the url-to-synchro node you're missing a _delta attribute.
    Take a look at the portal tutorials to learn more about all this : https://www.itophub.io/wiki/page?id=3_0_0:customization:start#customizing_the_portal

    Also note that customers get access to the ITSM Designer, a saas gui tool that let you customize about anything in iTop with just a few clicks. And of course they get access to our support services... If you're interested contact sales@combodo.com.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.