Help - Search - Members - Calendar
Full Version: search & replace in templates?
Movable Type Community Forum > Additional Resources > Tips and Tricks
scsmith
Is there any way to find & replace stuff in the templates rather than in the posts? I have a layout change to make across... lessee... about 30 templates -- none of which are associated with files -- and the cutting and pasting is getting old... smile.gif


-Steph
gramcracker
No way that I'm aware of, besides something with the MySQL database.

Why don't you have all the templates output a source file, download them, use a text editor to do a find/replace, upload them, and rebuild?
girlie
Aiiyeee! 30 templates! wink.gif

That's why I use modules to split up my layout.
distler
Hear, hear!

If the same code occurs in several templates, you save yourself endless trouble by making it a module, included with an MTInclude statement.

Evidently, since you are in the process of editing all those templates, now's the time to effect that change.
scsmith
Modules would be nice. I don't have enough similarity between these blogs to make them work. The current find-and-replace is necessitated by a pesky CSS layout issue.

Gramcracker - that might work. Thanks. smile.gif


Steph
scsmith
Hi, I'm a moron. Modules work beautifully. Thank you all!

-Steph
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.