CreateLink with target="_blank"

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
CNBorn
Forum Members
Forum Members
Posts: 21
Joined: Tue Feb 27, 2007 7:39 am

CreateLink with target="_blank"

Post by CNBorn »

With $this->CreateLink, How to Create a Link that will be opened in a new Window?
cyberman

Re: CreateLink with target="_blank"

Post by cyberman »

Please look at the API Docs

http://www.cmsmadesimple.org/apidoc/
CreateLink (line 1663)

Returns the xhtml equivalent of an href link This is basically a nice little wrapper to make sure that id's are placed in names and also that it's xhtml compliant.
void CreateLink (string $id, string $action, [string $returnid = ''], [string $contents = ''], [string $params = array()], [string $warn_message = ''], [boolean $onlyhref = false], [boolean $inline = false], [string $addttext = ''], [mixed $targetcontentonly = false], [mixed $prettyurl = ''])

    * string $id: The id given to the module on execution
    * string $action: The action that this form should do when the link is clicked
    * string $returnid: The id to eventually return to when the module is finished it's task
    * string $contents: The text that will have to be clicked to follow the link
    * string $params: An array of params that should be inlucded in the URL of the link. These should be in a $key=>$value format.
    * string $warn_message: Text to display in a javascript warning box. If they click no, the link is not followed by the browser.
    * boolean $onlyhref: A flag to determine if only the href section should be returned
    * boolean $inline: A flag to determine if actions should be handled inline (no moduleinterface.php -- only works for frontend)
    * string $addttext: Any additional text that should be added into the tag when rendered
$addtext can contain strings like target="_blank" ;).
Post Reply

Return to “Modules/Add-Ons”