Creation of Custom Widget

English! place to talk about development, programming and coding
Post Reply
Sattie
Znuny newbie
Posts: 3
Joined: 18 Jan 2023, 16:04
Znuny Version: 6.4.5
Real Name: Juan

Creation of Custom Widget

Post by Sattie »

Hi Znuny fellas,

I'm here today to ask for guidance on the definition of a new Widget, specifically, on the XML config part.

I want to create a widget that contains a button that triggers a custom module, but I'm struggling to basically see the widget on the Setting checklist of the Agent interface.

Based on internet examples, I have a xml file that looks like this:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<otrs_config version="2.0" init="Application">
    <Setting Name="DashboardBackend###CustomWidget" Required="0" Valid="1">
        <Description Lang="en">Test widget with button and confirmation</Description>
        <Group>Ticket</Group>
        <SubGroup>Frontend::Agent::Dashboard</SubGroup>
        <Setting>
            <Hash>
                <Item Key="Module">Kernel::Modules::CustomWidget</Item>
                <Item Key="Title">Example Widget</Item>
                <Item Key="Description">Example Widget with a button and confirmation</Item>
                <Item Key="Attributes">Button;</Item>
                <Item Key="Filter">All</Item>
                <Item Key="Time">Age</Item>
                <Item Key="Limit">10</Item>
                <Item Key="Permission">rw</Item>
                <Item Key="Block">ContentLarge</Item>
                <Item Key="Group"></Item>
                <Item Key="Default">1</Item>
                <Item Key="CacheTTLLocal">0.5</Item>
            </Hash>
        </Setting>
    </Setting>
</otrs_config>
I'm checking the documentation of Znuny https://doc.znuny.org/znuny/developer/g ... works.html and I see that in the newest versions, the syntax of the file has changed a little bit but I can't understand which syntax I should use to accomplish what I'm trying to do here.

So my dear Znuny fellas, anyone has faced a similar situation and can guide me a little bit? Any help will be appreciated.

Thank you in advance!!
Post Reply