How to make module CreateLinks open in new (non admin) page?

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
cyberman

Re: How to make module CreateLinks open in new (non admin) page?

Post by cyberman »

secoif wrote: these links open in a ridiculous admin/moduleinterface.php?mact=BarcodeGenerator,,default,0&tim=awesome url,
A barcode generator, great - will we see it in forge :)?
Just the same way the Album module opens Albums in their own pages when you click on a {$album->link}.
My php skills are very limited but I think it's "only" a ready formated element of array
I guessed and tried changing the 'inline' parameter, but no effect.  No idea.
Have you made a look at the API docs? The next parameter should work.

http://www.cmsmadesimple.org/apidoc/CMS ... CreateLink

You can open new windows if you add target='_blank' as $addtext ;).
alby

Re: How to make module CreateLinks open in new (non admin) page?

Post by alby »

secoif wrote:
function doStuff($id, $returnid) {
        $href = $this->CreateFrontendLink($id,
                                'default',
                                $returnid,
                                'Go',
                                array('tim'=>'potentially_cool'),
                                '',
                                false,
                                false,
                                '',
                                  true,
                                '');

        echo $href;
}
Have you checked $id and $returnid?

Alby
Post Reply

Return to “Developers Discussion”