How could I modify master page and update to all the pages in project

Dear All:
I am new user. I follow the document to create Master page and use it to add other pages.
I want to maintain master page and get all the other pages updated(which add from master page).
How could I do?
Best Regard
Su

I suggest you read the master pages doc

http://docs.pinegrow.com/editing/master-pages

and then the docs on editable content

http://docs.pinegrow.com/editing/editable-areas

Both of these should give you what you need to achieve what you asked

Dear Sir
Do have a video to learn how to do this?
I am not so understand how to do this.
Best Regard
Su




1 Like

There’s also this one.

My question is whether I should consider the elements of a master page the same as components, or do I need to embed the components within the master page as well.

Just getting to grips with master pages myself as I haven’t explored this feature until now.

Currently I’m creating a master page with

  • Nav
  • Header
  • Footer

Allowing the header to have an editable area for background image and as mentioned on another thread I’m building my blocks as html snippets for each project.

And following that video posted by @Farscaper I can make use of the main tag, define that as an editable area and drop my blocks as I please - love it!

So I watch some of the videos and read the documentation. However I also can’t find anything explaining how pages created with from a master page are affected when I add a new editable area to an existing master page.

For example: I have a footer in my original master page. None of the elements in the footer were made editable when the original master page was created. I created 8 new pages based on my master page.

Now, a few days later I decide I want to make the p-tag containing the copyright text editable. So I open my master page, select the p-tag containing the copyright text, and define an editable are called copyright. This is now how the tag looks in the master.html:

© 2018 MY Company

Now I save, reload and refresh the project, and open an existing page that was created with the master page BEFORE I added this new editable area. The new editable area does not appear in the page.

What am I doing wrong? Or is it really so: Adding a new editable area to an existing master page does not automatically update any pages created prior to adding the new area?

So I kind of found the answer to this on my own. After making some changes to my master.html file, I was just clicking the “orange refresh icon” in the menu bar next to “components”. It seemed logical that this would update everything. But it does not. It only performs a quick update (updates ONLY open pages). So after 2 hours of messing around I finally clicked on the word “Components” and saw in the submenu “UPDATE THE WHOLE PROJECT”. After clicking,

I could see an asterix next to alle files in the project that are linked with the master file, indicating they have been changes.

Another this that cost me some time is: If I close pinegrow before clicking on “Save all”, Pinegrow closes without warning me that I have changed files to save. OUCH.

3 Likes

Hi, maybe you already know what i’m writing, but after the “update whole project” command, i’m happy to use file> save all.
I now often use shit-cmd-u then alt-cmd-s (on a mac) to get it done faster :slight_smile:

1 Like

oups, i should wear glasses :

Another this that cost me some time is: If I close pinegrow before clicking on “Save all”, Pinegrow closes without warning me that I have changed files to save. OUCH.
:smiley:

My problem is that I have over a thousand pages that I want master pages to work for. After creating a master page and then transferring all the content into that template I find I need to change from making the entire header editable to just the title and description. This is because I need to change some other header item across the entire site but I’d made the entire header editable.

This means I have to delete the main header component and add the two others but that deletes all prior edited content so I’m back to repeating a thousand cut and pastes.

If anyone has a solution I will devote the time to a tutorial instead.

1 Like

Maybe you can do this by using Atom to do a global find>replace on the entire project?

2 Likes

I think that might solve part of my problem in that I have to change every protocol independent link so that the CSS on my new https site works.

For those that have never run across this you need to change every css link in your header from something like http://www.mydomain.com/stylesheetblahblah.css (not to https://) but simply to //www.mydomain.com/stylesheetblahblah.css

(Note the double backslashes without any reference to either http: or https:)

Then it is supposed to work for both secure and non SSL sites.

I had hoped to accomplish this with a new master page that reflected the changes but, since Pinegrow just overwrites all previous data in my title/description and main content, the intended fix breaks everything else.

So thanks, @Printninja I will try that. It’s been a while since I did a global search / replace anyway so I can use the practice.

1 Like

One issue with Atom is its desire to search and replace all of the Pinegrow backup folders as well.

Altering backups kind of defeats their purpose even if you are sure you are getting it right.

I found a solution that may be helpful to others.

So once you get to core settings you need to be sure you see this in your ignore section
.git, .hg, .svn, .DS_Store, ._*, Thumbs.db, _pgbackup

All but the _pgbackup should already be there but you mustn’t forget to add a comma after each entry ie. “, _pgbackup” or it won’t take.

Several tips are given but I’ve yet to try any since Atom is still busy replacing 8000 files instead of just 1000.

Well, technically, Atom is doing the right thing, in case you were to ever revert to one of those backups, but I personally don’t use the Pinegrow backup feature.

I don’t recall ever doing so either.

Besides, I always find that no matter how much redundancy I create, the important file I need is nowhere to be found. Ha.

2 Likes

Make sure to also do that with javascript and other files like images also.

If you have a specific secure location on your website you DO NOT want to have just the two slashes at the beginning of the url but specifically hardcode the https also otherwise people can get to private areas, secure forums, payment forms, shopping cart via non secure url which is NOT a good thing. But if you are using the same css and other files for the secure and non-secure sections of your site you need to have all of the files served from the secure url or there will be security notices in the browser of the user and the lock icon will be red or non-existant or slash through it.

1 Like

I have decided to go entirely with hard-coding of all links.

I am also thankful that I have PG backups since I’ve had even PG crash and leave me with a blank file that I’ve needed to save.

Atom is giving me some issues finding blocks of code site-wide, even though it finds the same text in a single file, but overall is saving my butt with it’s find and replace in project feature.

I still wish I could make just the title and description parts of the header editable and not the entire thing. Maybe it’s possible, but no one from Pinegrow has piped in on the topic yet.

Am I to understand that if you make a change to “master” that it doesn’t automatically update all pages that are based on the master?!! The video in this thread shows you loading one file at a time, and manually updating each with the master. Surely that can’t be the only “master” scenario to update.