symphony-3 icon indicating copy to clipboard operation
symphony-3 copied to clipboard

More flexible way to get extension path

Open allen opened this issue 14 years ago • 1 comments

From Tony Arnold:

How do I get the current extension's path without hard coding the name of the directory? I need to load some assets, and it seems quite inflexible to make my extension folder name be something that has to stay the same.

Related forum discussion: http://symphony-cms.com/discuss/thread/46111/3/

allen avatar Jul 19 '10 12:07 allen

From Alistair:

Easy solution, developer sets his own constant. Could implement API level solution. Perhaps a new function that returns the folder name based on the path of the extension. Wouldn't be too hard.

allen avatar Jul 19 '10 12:07 allen