1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Merge pull request #22 from stephenbe/master

add current url in controller
This commit is contained in:
Stephen Bégay
2015-05-26 21:51:11 -04:00

View File

@@ -87,7 +87,7 @@ class Boilerplate_Template_Controller extends Charcoal_Template_Controller
* In short, it allows to call the objects with `->texts()->ident;` // `{{sections.ident}}` to return (and load on-the-fly, if required)
* the `CMS_Text` object with the `ident` "ident".
*
* @return \Charcoal_Object_Loader
* @return \Charcoal\Object_Loader
* @see CMS_Section
*/
public function sections()
@@ -110,7 +110,7 @@ class Boilerplate_Template_Controller extends Charcoal_Template_Controller
* In short, it allows to call the objects with `->sections()->ident;` to return (and load on-the-fly, if required)
* the `CMS_Section` object with the `ident` "ident".
*
* @return \Charcoal_Object_Loader
* @return \Charcoal\Object_Loader
* @see CMS_Text
*/
public function texts()
@@ -144,6 +144,16 @@ class Boilerplate_Template_Controller extends Charcoal_Template_Controller
return \Charcoal::$config['URL'];
}
/**
* Return the current URL
*
* @return string
*/
public function current_url()
{
return Charcoal::$config['HTTP_MODE'] . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
}
/**
* Test templating.
*