Jump to content

[resolved] getCustomLink replacement


valentin.g

Recommended Posts

What function I will use instead getCustomLink ?

 

/**
 * @deprecated
 */
public function getCustomLink($id_custom, $page, $prefix = '~', $alias = NULL, $id_lang = NULL)
{
 Tools::displayAsDeprecated();
 if (is_object($id_custom))
  return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_custom->id).$prefix.$id_custom->link_rewrite) :
  (_PS_BASE_URL_.__PS_BASE_URI__.$page.'?id_custom='.(int)($id_custom->id));
 if ($alias)
  return ($this->allow == 1) ? (_PS_BASE_URL_.__PS_BASE_URI__.$this->getLangLink((int)($id_lang)).(int)($id_custom).$prefix.$alias) :
  (_PS_BASE_URL_.__PS_BASE_URI__.$page.'?id_custom='.(int)($id_custom));
 return _PS_BASE_URL_.__PS_BASE_URI__.$page.'?id_custom='.(int)($id_custom);
}

 

There is getPageLink function but without a custom parameter (id_custom)

 

public function getPageLink($filename, $ssl = false, $id_lang = NULL)

 

Please advise.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...