Hi,
Sorry if this is an obvious one. I've done some searching and can't find quite what I'm after. I'm converting a template site to SilverStripe. I have a collection of global PHP functions and they are site wide. i.e. I have a helper function for constructing external links with the html. Now in SS I try:
some_page.ss
...
<p>Get your link here</p>$ExternalLink(~url~, ~link text~)
...
Which is meant to output:
<p>Get your link here</p><a class="external" href="~url~" target="_blank">~link text~</a>
I initially placed this in the Page_Controller and so Page.ss works fine. Now I've tried it on a different page type and it obviously doesn't work. In C++ I would have something like "class LinkUtils { public: static void create_external_link(...); };" and happily call "LinkUtils::create_external_link();". You get the idea. But SS?
Bashing head.
J.