Hi,
The method getsubstyle(String relativePath) you are referring to requires an argument, relativePath; otherwise, it won't work. As explained by @h_kataria, you cannot invoke methods with parameters via HTL. The recommended approach is to use a Sling Model, where you can do something like this:
...