$invoice = $this->modules->get('ProcessInvoice');
$invoicePage = $this->pages->get("template=admin, process=$invoice");
// OR
$invoicePage = $this->pages->get("template=admin, process={$invoice->name}");
How to get admin page with certain Process assigned?
Started by apeisa, Jun 11 2012 06:31 AM
7 replies to this topic
#1
Posted 11 June 2012 - 06:31 AM
I have feeling that I have asked (or at least read) answer to this one before, but couldn't find the answer anywhere. I have tried this kind of stuff without any luck:
#2
Posted 11 June 2012 - 06:49 AM
Not sure, have you tried adding "include=all" ?
@somartist | modules created | support me, flattr my work flattr.com
#3
Posted 11 June 2012 - 07:32 AM
Well it seems it only works if you use the process module id. But no idea how to get that. As far as I know the process is handled through names. Look at admin.php in core.
Edit: So only solution I see for now is looping and checking for $page->process == "ProcessName".
Edit: So only solution I see for now is looping and checking for $page->process == "ProcessName".
@somartist | modules created | support me, flattr my work flattr.com
#6
Posted 11 June 2012 - 04:01 PM
Weird when I tested this with getModuleID, It'd always return 0.
@somartist | modules created | support me, flattr my work flattr.com
#7
Posted 12 June 2012 - 02:28 AM
I haven't yet tested this, ended up using different method. Will test this soon.
#8
Posted 15 June 2012 - 06:56 AM
Try this one:
$invoice = $this->modules->getModuleID('ProcessInvoice'); $invoicePage = $this->pages->get("template=admin, process=$invoice");
Had to use this in other situation and it works for me. Thanks Ryan!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












