apeisa Posted June 11, 2012 Share 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}"); Link to comment Share on other sites More sharing options...
Soma Posted June 11, 2012 Share Posted June 11, 2012 Not sure, have you tried adding "include=all" ? Link to comment Share on other sites More sharing options...
Soma Posted June 11, 2012 Share 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". Link to comment Share on other sites More sharing options...
diogo Posted June 11, 2012 Share 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 Link to comment Share on other sites More sharing options...
ryan Posted June 11, 2012 Share Posted June 11, 2012 Try this one: $invoice = $this->modules->getModuleID('ProcessInvoice'); $invoicePage = $this->pages->get("template=admin, process=$invoice"); 1 Link to comment Share on other sites More sharing options...
Soma Posted June 11, 2012 Share Posted June 11, 2012 Weird when I tested this with getModuleID, It'd always return 0. Link to comment Share on other sites More sharing options...
apeisa Posted June 12, 2012 Author Share Posted June 12, 2012 I haven't yet tested this, ended up using different method. Will test this soon. Link to comment Share on other sites More sharing options...
apeisa Posted June 15, 2012 Author Share 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! Link to comment Share on other sites More sharing options...
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