getThemePath() returns wrong folder

Permalink
I'm making a custom theme in concrete 5.6 and I got a problem with the [$this->getThemePath()] function. I'm using this for multiple area's to include images for example.

At first it was working fine but after I added a new Page format the result of this function was different. First my result was [/themes/myTheme/img/image.png]. After adding a new Page format this function results in [/concrete/themes/myTheme/img/image.png]. I searched multiple forums for this problem, the only thing I found was a problem where people didn't have a view or a default.php, I got both included.

Does anyone know this problem and has a solution for me? This problem is kind of urgent.

 
mnakalay replied on at Permalink Reply
mnakalay
I am not sure why this is happening but since it's urgent maybe you could use a little hack while you look for a proper answer

$path = str_replace("/concrete", "", $this->getThemePath());

this basically just removes the "/concrete" part from the path.

You can then use $path instead of $this->getThemePath() anywhere it's needed
dipsausDennis replied on at Permalink Reply
Thanks for your reply.
This solution will work temporary and was indeed my solution for now. This solution can be a problem when moving my site to a other domain. I can use this code for development.