Set package tool url with parameter

Hi everyone
I've been looking around for an answer (maybe wrong keywords...)for a while.....
Package Development/Block-Controller
Pass parameters to a tool file.
the tool-script 'check_url' is working, so please, dont tell me about....
public function add(){
    // which calls
       private function set_package_tool($tool_name)
        $tool_helper = Loader::helper('concrete/urls');
        $this->set($tool_name, $tool_helper->getToolsURL($tool_name, $this->getPkgHandle()));

I'd like tho pass the package handle, which is a getter in the block-controller
public function getPkgHandle() {
        return BlockType::getByHandle($this->btHandle)->getPackageHandle();

My best approach was...
// In th add()/edit() method    
    // In the check_url.php I called it like in a view or so
    echo $pkgHandle;
but nope!
Please Help! ;-)

View Replies: View Best Answer
daenu replied on at Permalink Reply
Another approach which isn't really beautifull nor MVC-style but it works; Pass the param as GET
$this->set($tool_name, $tool_helper->getToolsURL($tool_name . '?test=xxx', $this->getPkgHandle()));

But isn't there a clean way to resolve this ???
daenu replied on at Permalink Best Answer Reply
1. A getter in the controller
public function getPkgHandle() {
    return $this->pkgHandle;

2. in the tools file
$bc = new MyBlockController();
$pkg = $bc->getPkgHandle();

This is definitely a solo-thread, but if ev. someone is interested in this.....

I found a post from Jordan Lev( this morning.
For me that's the best (and only) answer!