MikeF77 Posted November 3, 2022 Share Posted November 3, 2022 Hi all, Im sure you guys can point me in the right direction. Im a former web developer from the days where you opened notepad and type tags to build a page, but havent done that for probably a decade or so. I have a little experience with CMS using wordpress but this is the first time I have come across processwire. I work for a tiny company who got a 3rd party to create their site and now need a few changes. Is there an idiots guide or such as I cant even work out how to amend things like css files or how to add google analytics tags to the head of each page. Be gentle im probably old enough to be the dad of all of you! Thanks in advance Mike 1 1 Link to comment Share on other sites More sharing options...
flydev Posted November 3, 2022 Share Posted November 3, 2022 Hi Mike, welcome, as you are used with Notepad, then you are on the best solutionware to keep using it, easier than wordpress really. Read a bit there and choose an output strategy that feel your dev experience (biased suggestion: Delayed Strat.) : https://processwire.com/docs/front-end/output/https://processwire.com/docs/tutorials/default-site-profile/ Then watch this vid: And enjoy ? edit: before you ask, when you will stumb on some ten years answer forum thread, yes they almost still work in 2022. But at least upgrade your php 3 install ? 2 Link to comment Share on other sites More sharing options...
bernhard Posted November 3, 2022 Share Posted November 3, 2022 Hi @MikeF77 welcome to the forum and to the world of processwire ? 2 hours ago, MikeF77 said: Is there an idiots guide or such as I cant even work out how to amend things like css files or how to add google analytics tags to the head of each page. The thing here is: ProcessWire is very different to other CMSs in that it does not dictate HOW things are done. It just tries to make all the complicated things easy so that you can focus on building your ideas rather than having to fiddle around with all the technical parts. So for example it helps you to resize images properly ($page->your_image_field->maxSize(400,300)->url), but it has no default way of how images are managed. So there is no central media manager or such. That might be important to understand when looking how things are done. That means in your case you don't need to understand how ProcessWire works, but you need to find out first how the company built the website. To understand that you could inspect the file /site/templates/home.php --> that is the template file for the home page and it is rendered when anybody opens http://yoursite.com Maybe you could share the content of that file? Or a screenshot. Without any sensitive information of course. Then we could maybe give better instructions ? Or maybe with the video posted about things are already clearer? Also have a look if there is maybe a file /site/templates/_main.php ? Let us know what you find and we can help I'm sure ? 2 Link to comment Share on other sites More sharing options...
DaveP Posted November 3, 2022 Share Posted November 3, 2022 5 hours ago, MikeF77 said: Be gentle im probably old enough to be the dad of all of you! Not all. ? 2 Link to comment Share on other sites More sharing options...
MikeF77 Posted November 4, 2022 Author Share Posted November 4, 2022 14 hours ago, bernhard said: Hi @MikeF77 welcome to the forum and to the world of processwire ? The thing here is: ProcessWire is very different to other CMSs in that it does not dictate HOW things are done. It just tries to make all the complicated things easy so that you can focus on building your ideas rather than having to fiddle around with all the technical parts. So for example it helps you to resize images properly ($page->your_image_field->maxSize(400,300)->url), but it has no default way of how images are managed. So there is no central media manager or such. That might be important to understand when looking how things are done. That means in your case you don't need to understand how ProcessWire works, but you need to find out first how the company built the website. To understand that you could inspect the file /site/templates/home.php --> that is the template file for the home page and it is rendered when anybody opens http://yoursite.com Maybe you could share the content of that file? Or a screenshot. Without any sensitive information of course. Then we could maybe give better instructions ? Or maybe with the video posted about things are already clearer? Also have a look if there is maybe a file /site/templates/_main.php ? Let us know what you find and we can help I'm sure ? I am a bit lost - I thought id be able to just find the code and get cracking but this is totally different than anything Ive seen before! Here is the home... Link to comment Share on other sites More sharing options...
flydev Posted November 4, 2022 Share Posted November 4, 2022 (edited) (In my first message, I didn't understood that you was going to modify an existing ProcessWire site). But the message is still valid to get an introduction before the update. 1 hour ago, MikeF77 said: I thought id be able to just find the code and get cracking but this is totally different than anything Ive seen before! What do you mean by "just find the code" ? You mean in an admin page ? You have everything you are looking for in `home.php`, read below. 1 hour ago, MikeF77 said: is totally different than anything Ive seen before! Not really, you could even forget the admin, (even if it's not really the case, but that's how I still see it and saw it), the admin pages, fields and templates let you manage and organize what's inside the db, it's just easier. On your screenshot, we can see that the code of the homepage, is in `/site/templates/home.php` and pull from the database the title of the page from the field `title`, some images for what it look to be, a carousel or hero block `hero_image`, also some client testimonials from `testimonials` field. As you are old, to refresh your memory, remember when you was getting theses data from a database with `select * fields from site_db where page="home"`, now you have it at hand, in an admin page, with a lot of API helpers given by ProcessWire to get/set all of that. Now, if you understand that the $page call give you the current visited page, called `home` in your example, in the page-tree, with a template (file with code) `home.php` then you can understand that $page->title, $page->hero_image and $page->testimonials give you the value (from the db) of theses fields. Anyway, please open with notepad the file /site/templates/home.php and paste it here in the thread so we can get the strategy used (I bet it's the simple one with php include() calls) and we will be able to make things more clear to you. Edited November 4, 2022 by flydev 2 Link to comment Share on other sites More sharing options...
pwired Posted November 4, 2022 Share Posted November 4, 2022 The history of the forum is loaded with posts that answer your question Here is one to start with but there are dozens more of them https://processwire.com/talk/topic/4173-grouped-forum-posts-links-articles-tutorials-code-snippets/ 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