[SOLVED] Getting $Data from other dtl blocks
Moderator: crythias
[SOLVED] Getting $Data from other dtl blocks
Hey.
I´m rebuilding the AgentDashboard and I need $Data{"Name"}, which contains the names of the different filters (New Tickets, Open Tickets...). (File: Kernel/Output/HTML/Standard/AgentDashboardTicketGeneric.dtl)
Of course I can use it in the ContentLargeTicketGenericFilter Blocks because it´s specified in the Kernel/Output/HTML/DashboardTicketGeneric. But I need it in the ContentLargeTicketGenericRow dtl block.
Any ideas?
Best regards
FiL
I´m rebuilding the AgentDashboard and I need $Data{"Name"}, which contains the names of the different filters (New Tickets, Open Tickets...). (File: Kernel/Output/HTML/Standard/AgentDashboardTicketGeneric.dtl)
Of course I can use it in the ContentLargeTicketGenericFilter Blocks because it´s specified in the Kernel/Output/HTML/DashboardTicketGeneric. But I need it in the ContentLargeTicketGenericRow dtl block.
Any ideas?
Best regards
FiL
Last edited by FiL on 01 Aug 2012, 15:12, edited 1 time in total.
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Getting $Data from other dtl blocks
If you've seen that far, you probably would have been close enough to figure out what you need.
Kernel/Output/HTML/DashboardTicketGeneric.pm
and then
Fill what you want into additional Data.
Kernel/Output/HTML/DashboardTicketGeneric.pm
Code: Select all
# get filter ticket counts
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericFilter',
Data => {
%{ $Self->{Config} },
Name => $Self->{Name},
%{$Summary},
},
);
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Ticket,
);
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Getting $Data from other dtl blocks
Tried that but the problem is that if I change it to
It will add an additional empty line in front of the tickets in the Dashboard
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => { Name => $Self->{Name},
\%Ticket,
},
);
Last edited by FiL on 01 Aug 2012, 14:24, edited 1 time in total.
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Getting $Data from other dtl blocks
You didn't close "Data" btw. I don't know that makes a difference, but...
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Getting $Data from other dtl blocks
Yeah just edited it, but no difference.
I made a workaround by using the StadeIDs of the ticket, but it would be more comfortable if I could get the FilterNames
I made a workaround by using the StadeIDs of the ticket, but it would be more comfortable if I could get the FilterNames
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Getting $Data from other dtl blocks
Because of what? (What field is providing the blank line?)FiL wrote:It will add an additional empty line in front of the tickets in the Dashboard
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Getting $Data from other dtl blocks
Just saw that I made it different sorry.
I tried the one I quoted before but that didn´t work so I left it like this
and added
That´s the one solution with the additional empty line.
I tried the one I quoted before but that didn´t work so I left it like this
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => \%Ticket,
);
Code: Select all
$Self->{LayoutObject}->Block(
Name => 'ContentLargeTicketGenericRow',
Data => { Name => $Self->{Name},
},
);
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
Re: Getting $Data from other dtl blocks
No field gave me the additional line. It´s just like if the first line comes like the "first" ticket although it´s the Name of the Filter and therefore is empty, because it has not the same attributes as a ticket.crythias wrote:Because of what? (What field is providing the blank line?)FiL wrote:It will add an additional empty line in front of the tickets in the Dashboard
I´ll try to catch that with Java Script I think.
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
-
- Moderator
- Posts: 10170
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: Getting $Data from other dtl blocks
oh. so it's counting the number of entries (?) that's ... interesting, and makes sense, kinda. Which means you're trying to use a global attribute with a line item.
That does beg a question, though ...
That does beg a question, though ...
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
Re: Getting $Data from other dtl blocks

The lines with the +/- are the queues.
You see the additional + above?
That´s what I mean
But I should be able to catch the first line in the .dtl file
/e Hope it works
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
Re: Getting $Data from other dtl blocks
Just solved it with Javascript.
Just "asked" the lines if there is a Queue and if there isn´t the line gets ignored
Thank you for your replies and your help.
Just "asked" the lines if there is a Queue and if there isn´t the line gets ignored
Thank you for your replies and your help.
Dev
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux
OTRS-Version: 3.1.7
System: Ubuntu Linux
Prod
OTRS-Version 3.0.9
System: Ubuntu Linux