Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The called build()-method expects an associative array wich has to have at least a value for the key 'lang' but any parameter can be appended. If another builder than cUriBuilderFrontcontent is used (see below) further keys may be required.

You can give the data as a default URI too. In this case the given URI is parsed (see below) before building it anew.

Code Block
languagephp
linenumberstrue
$url = "front_content.php?idart=$idart&lang=$lang";

...


$url = cUri::getInstance()->build($url);
Tip
titleURI to current article

If you like to create a link to the current article you can use this snippet instead which gets the values for the current language and article from the registry:

Code Block
languagephp
linenumberstrue
$url = cUri::getInstance()->build(array(
    'lang' => cRegistry::getLanguageId(),
    'idart' => cRegistry::getArticleId()
));

Relative vs. absolute URIs

...