I am trying to modernize an older html/css website. I bought an html/css theme, with multiple pages that I intend to adapt with my own text and images. I have successfully created my own header/footer for the index.html page. I’d like to copy this header/footer to all the other pages in the theme (i.e. do a global replacement). I’m looking for an easy way to do this. The only thing I can think of is to do some sort of simple global search and replace using Notepad++ with all my files open, but I’m wondering if there is an easy way to do this in Pinegrow? Any advice appreciated for a newbie.
Thanks, Steve. I can see how this might work. I’ll have to figure out how to insert the new header/footer components into each page. Maybe I have about twenty now, so it should be doable. Then, I assume that whatever changes I make to the components would be universally applied.
Again, thanks much for replying to this old question.
Pinegrow uses the header and footer from the index.html file (or other master page) to create the header.php and footer.php template files. You need to include a Site Content action in your template to tell it to use that header/footer, though. Check the link below for a more thorough explanation.
Adam - Always appreciate your posts, videos and info. You have a great nack for explaining things that even a design-oriented beginner like myself can understand. I’ve been doing this for a while, but its all self taught with lots of Google-ing… LOL. Thanks for investing your time.
PS - Really liked the “Challenges for new Pinegrow users” thread
Here’s a follow-up question. I have largely finished my website modernization, and because I’m not very experienced I went about things the hard way, manually pasting the new header /footer into each page. Now, I find I need to just tweak a tiny bit of the code in the header. Instead of repasting the whole header into each page, I am wondering if there is an easy search and replace way to do things. I saw the other day that there is a new Search and Replace function for PineGrow, and am wondering if this would make it easier to do a very simple search and replace (of just a few lines in the header) across, say, twenty pages in the project. Also, in PG 8.3 there is reference to using AI to do search and replace-type of actions on multiple files, but this is still a bit scary for me. Thanks much in advance for any advice.
You should use components for the header and footer. Or a master page. When you then add something to the header which defines the component, Pinegrow will automatically update all the pages where you used this header component.
It takes some time to implement this, but it will save you much time in the future. Your change now won’t be the last.
and I dont know if PG does project wide search and replace yet (ive not checked, no idea,) but if. you use an external editor, they usually have a project wide search in all open files or the project search.
in VSCode, its called find in files for instance, not just find.
and probably, you could have done it the way @Riccarcharias suggested in the first place, …in 2023.
Then you’d just be editing ONE file.
Oh well ,time for the next website update again then I guess
I can definitely see the merits of having done it correctly the way others suggested in the first place. It’s painful to admit, but I’m not sure I have the chops to do it retroactively now. When I get really bold someday, I hope to go back and do that! In the meantime, maybe I will just try to do a project wide search and replace for some tiny tweaks. Thanks to all of the suggestions and advice!
Thanks to all for the advice and encouragement. I do have an external editor, Notepad ++, that can do global search and replace, but I try not to use it with PineGrow. PG 8.3 does seem to have a rather powerful search and replace now, and I will probably try that, making sure to follow your advice about BACKING UP any and all files that might be affected!
Great news! We took a little time, but with Pinegrow Web Editor 8.1 - October 24, 2024, we’ve added an advanced Find and Replace feature that also works in project mode.