apeisa Posted June 11, 2012 Posted June 11, 2012 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}");
Soma Posted June 11, 2012 Posted June 11, 2012 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".
diogo Posted June 11, 2012 Posted June 11, 2012 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
ryan Posted June 11, 2012 Posted June 11, 2012 Try this one: $invoice = $this->modules->getModuleID('ProcessInvoice'); $invoicePage = $this->pages->get("template=admin, process=$invoice"); 1
Soma Posted June 11, 2012 Posted June 11, 2012 Weird when I tested this with getModuleID, It'd always return 0.
apeisa Posted June 12, 2012 Author Posted June 12, 2012 I haven't yet tested this, ended up using different method. Will test this soon.
apeisa Posted June 15, 2012 Author Posted June 15, 2012 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!
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now