Revision: 132
http://sourceforge.net/p/beeframework/code/132
Author: m_plomer
Date: 2013-11-22 15:36:09 +0000 (Fri, 22 Nov 2013)
Log Message:
-----------
- added smarty function for base path
Added Paths:
-----------
trunk/framework/resources/smarty/function.get_base_path.php
Added: trunk/framework/resources/smarty/function.get_base_path.php
===================================================================
--- trunk/framework/resources/smarty/function.get_base_path.php (rev 0)
+++ trunk/framework/resources/smarty/function.get_base_path.php 2013-11-22 15:36:09 UTC (rev 132)
@@ -0,0 +1,13 @@
+<?php
+/**
+ * User: mp
+ * Date: 30.09.13
+ * Time: 23:20
+ *
+ *
+ */
+function smarty_function_get_base_path(array $params, Smarty_Internal_Template $template) {
+ $abs = array_key_exists('absolute', $params) && $params['absolute'];
+ $basePath = $abs ? Bee_Utils_Env::getAbsoluteBasePath() : Bee_Utils_Env::getBasePath();
+ return Bee_Utils_Strings::hasText($basePath) ? ($abs ? '' : '/') . $basePath : '';
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|