Jump to content

How to get URL to template directory in global namespace?


Neo
 Share

Recommended Posts

Working in the global namespace ( wire('page') ), I am trying to get the URL to the template directory to set the path for an image:

http://localhost/project/site/templates/images/loading-animation.gif

On a normal page, this would usually work with

$out .="<img src='{$config->urls->templates}images/loading-animation.gif' alt='Loading Animation'>"; 

In this case it does not: "$config->urls->templates" does not return anything and the full path of the particular page is loaded:

http://localhost/project/videos/page-title/images/loading-animation.gif

Would appreciate your guidance.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...