Neo Posted August 10, 2015 Posted August 10, 2015 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.
adrian Posted August 10, 2015 Posted August 10, 2015 It's the same as wire('page') wire('config') Same goes for all PW variables (https://processwire.com/api/variables/) 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now