Is there any Joomla way to return the path or parent's folder path of a current script?
So far when needed, I am using the Joomla Constants and building manually the remaining of the path. It's also possible with php, but I am wondering if there is any Joomla API functionality to get around this.
So let's say I am inside a template override:
templates/mytemplate/html/my_component/my_view/template.php
And want to create a new directory inside the parent "view" directory in order to place a file inside it, like so:
templates/mytemplate/html/my_component/my_view/newDir/newfile.ext
Then I want to call/link that new newFile.ext from the template.php file.
Is there any Joomla way to get the path of my_view dir?
dirname ( __FILE__ )
dirname( dirname(__FILE__) );