ryanC Posted August 17, 2017 Share Posted August 17, 2017 Hi, I’m building a simple Processwire test site. I am coding the pages with traditional HTML and CSS on my desktop, and then entering my HTML content into Processwire fields as a last step. The idea is to have a functioning static desktop version that works independent of any CMS. My php knowledge is very limited right now, but I am trying to learn. I have my Processwire templates and fields set up just the way I want, my question is regarding the path I have for my images. Right now, in Processwire, the field I enter my HTML content has this as an image path: <img src=“/siteName/site/templates/images/photograph.jpg" /> That works, but I would like it to be: img src="images/photograph.jpg"/> This way I could still have a functioning page independent of Processwire. Is this possible? Can I tell Processwire to ignore all those other levels of folders and just accept "images/photo"? Thanks! Link to comment Share on other sites More sharing options...
ryanC Posted August 18, 2017 Author Share Posted August 18, 2017 Looks like I found the answer here on the forums: So now my path has: <base href="<?= $config->urls->templates ?>" /> in the header section, and from there I can simply type "images/photo.jpg" in my field. 1 Link to comment Share on other sites More sharing options...
AndZyk Posted August 18, 2017 Share Posted August 18, 2017 Hello @ryanC, you can also use the shorter version <?=$urls->templates?> since PW 3.0.50. Regards, Andreas 1 Link to comment Share on other sites More sharing options...
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