In one of our templates we need to output the full directory path to a file but not include the actual filename itself. $rx.location.generate() gives us the full path including the filename. Something like this:
This produces something like:
It seems like Java would certainly have something to handle this. Perhaps this is even an available function in Velocity or as part of the Percussion API. Does anyone know a function we can use to just return the directory path without the filename, given output like that produced by $rx.location.generate()?
Unfortunately not knowing what functions/methods are available in which context is a major stumbling block for our development efforts. Using “debug” when previewing pages has helped but does not appear to be comprehensive. This difficulty is primarly due to being new to Java and unaware of where the documentation covers how Java/Velocity/Percussion API fits together and how we can use these when writing code for our templates. Does anyone know where the documentation outlines how all this ties together in CM System? Is there perhaps a tutorial which covers this topic?
We’ve had similar difficulty finding information on what system variables, etc. are available in what context. In asking technical support and also the consultant who helped us with our initial implementation work, we were told there basically is no single reference which outlines all the variables and describes them in detail. Instead it appears as though this information is sprinkled throughout the documentation instead of being consolidated into a comprehensive reference. To be sure, there is a significant number of documentation resources from the Java and Percussion API pages to the wiki and PDFs to the class materials, but we’ve yet to find something that ties these things together (Java functions/methods, Velocity, available variables, etc.) and describes how we can find whatever we need to deal with each coding situation we face. Without an understanding in this area it is quite hard to be self reliant and must instead post these which we’d prefer to not take up time on the forum if we knew how to find these simple answers ourselves.