Jump to content

Recommended Posts

Posted

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:

$invoice = $this->modules->get('ProcessInvoice');
$invoicePage = $this->pages->get("template=admin, process=$invoice");
// OR
$invoicePage = $this->pages->get("template=admin, process={$invoice->name}");
Posted

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".

Posted

It's a bit strange...

echo $pages->get('3')->process; // returns "ProcessPageList"
echo $pages->get("process=ProcessPageList")->name; // returns nothing

This happens even in a visible, non admin, template

Posted

Try this one:

$invoice = $this->modules->getModuleID('ProcessInvoice');
$invoicePage = $this->pages->get("template=admin, process=$invoice");
  • Like 1
Posted

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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...