Mobile app version of vmapp.org
Login or Join
Angie530

: How to edit thousands of html pages at once? I need to edit thousands of pages for a website with dynamic content added manually by the owner throughout 3 years, it has thousands of pages

@Angie530

Posted in: #Css #Html #Php

I need to edit thousands of pages for a website with dynamic content added manually by the owner throughout 3 years, it has thousands of pages and I'm sure there is a better way to edit them without spending hours opening each one of them.

I know it would be easy to just edit the styles.css but page dynamics like the positions of the google ad-boxes are individually edited inside the html of each page, so there is no way to solve this through css.

Is there some sort of code, script and macro that can edit the pages at once?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Angie530

1 Comments

Sorted by latest first Latest Oldest Best

 

@Jamie184

dynamic content added manually


So, you mean the content is static?

Providing there is at least some common structure to these pages then many code editors allow you to search/replace across multiple (hundreds, thousands, ...) files using regular expressions. Backup, backup, backup...


the positions ... are individually edited inside the html of each page


By adding/removing HTML elements?!

If it's a case of overriding HTML attributes or inline styles then this can be achieved using a common stylesheet.

However, it doesn't take many global search/replaces across 1000's of files before it becomes more cost effective to redo the whole thing with some kind of templating system. (I worked on a site like that a few years - it absolutely did my nut!)

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme