ioio Posted October 30, 2013 Share Posted October 30, 2013 Hello everyone, I am using processwire for the first time. I am confused about whether replacing head.inc and foot.inc in the /site/templates with my own head.inc and foot.inc. I created these files by copying the code that is repeating throughout the site both at the beginning of the pages and the end of them. I guess the admin part of the site is using head.inc and foot.inc too but I am not sure. I am afraid to replace those files and screw up things in the admin part of the site. Those pages certainly don't need the navigation or the social links that are contained in my files. Do I rename my files or do I place them somewhere else? Link to comment Share on other sites More sharing options...
adrian Posted October 30, 2013 Share Posted October 30, 2013 Hi ioio and welcome to the forums. You can edit anything under the site/templates folder without affecting the admin side of PW. Let us know how it works out with the head and foot files and if you have any more specific questions. Also, not that you don't even need to follow the structure of having a head and foot file. Many users prefer a main.inc file which contains the entire site structure and echos the content variables where appropriate and is included at the end of each template file. There are other possible approaches as well - really it just comes down to what works best for you and how you like to work and mentally visualize things. 2 Link to comment Share on other sites More sharing options...
diogo Posted October 30, 2013 Share Posted October 30, 2013 Hi ioio, welcome to the forum! You can replace them without any problem. Actually, you can replace everything in the templates folder by your own files without any problem with the exception of admin.php. Just be aware that ProcessWire will look on that folder for the php files that correspond to the names of your page templates. You can also replace the scripts and style pages and organize your includes inside your own folder structure, as long as you call them with the correct path on the include() function. Edit: Adrian was faster because Canada is closer to the PW server than Portugal Edit: On the other hand, Portugal is closer than France and Switzerland 2 Link to comment Share on other sites More sharing options...
celfred Posted October 30, 2013 Share Posted October 30, 2013 (edited) Hello ioio, Welcome to the ProcessWire community! Don't be afraid of messing the admin part of ProcessWire as long as you touch templates in the site/templates/ directory of your installation. You can indeed use the same names head.inc and foot.inc even though you change all their content. The Admin part is left clean because it resides in the wire/ directory and you don't want to touch this one ;-) Actually, this is my first answer to someone's question! No doubt another member of the community will provide you with useful recommendations. Hope I helped ! EDIT : Woa... You guys are so fast... Edited October 30, 2013 by celfred 1 Link to comment Share on other sites More sharing options...
Soma Posted October 30, 2013 Share Posted October 30, 2013 Hi ioio Link to comment Share on other sites More sharing options...
ioio Posted October 30, 2013 Author Share Posted October 30, 2013 Hello everyone Thank you for your replies. Ok....so I will replace them and see what happens I saved the original files just in case I think I will try the main.inc approach after I become more familiar with both processwire & php. I am at the beginning of the beginning Link to comment Share on other sites More sharing options...
Soma Posted October 30, 2013 Share Posted October 30, 2013 Just be nice with PW and it will be nice to you ; 2 Link to comment Share on other sites More sharing options...
pwired Posted October 30, 2013 Share Posted October 30, 2013 http://processwire.com/talk/topic/3388-question-about-headinc-and-footerinc/ head and foot.inc start to make sense only after getting used to pw, maybe they need to be introduced more beginners friendly. 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