Hi
I'm not as proficient with text editors as many on this list.
BBEdit has a very handy thing called "Includes"
The easiest way for me to describe them is simply to copy and paste from BBEdit help:
An include file, or just an "include," is a special form of placeholder whose substitution happens to be the contents of another file. If you have used C or certain other programming languages, you may already be familiar with the concept. Using includes, you can reuse standard bits of text content or HTML markup in several templates or clippings entries without having to revise all of those individual files whenever you revise the included text. Apologies for not only mentioning BBEdit but pasting in something from the help :)
The reason I want to use includes like this now is that I have quite a large web-site which uses PHP includes a lot.
I have been asked to put this web-site on a CD and of course the problem is that a CD doesn't have any PHP.
So, as you have probably guessed, I need to convert the web-site changing all the PHP includes into the actual chunks of HTML in the files supplying those PHP includes.
I know that with BBEdit I would do a find/replace changing the PHP includes in BBEdit includes and do it that way.
However I haven't used BBEdit for quite a while now because I tend always to use TextMate now of course.
I'm wondering if I can do this in TextMate?
I've been doing searches through the excellent "TextMate: Power Editing for the Mac" with "includes" and "placeholders" but it doesn't turn up a description of something similar.
Thank you for any assistance you can give.
Patrick
On Thu, Aug 28, 2008 at 12:32:50AM +0100, Patrick James wrote:
Hi
So, as you have probably guessed, I need to convert the web-site changing all the PHP includes into the actual chunks of HTML in the files supplying those PHP includes.
It's not editor specific, but in such situations I tend to set up a server with php on my home computer, and then use wget -r (or something similar, check the man page) to crawl the website. With those files I just do a find and replace on all the links (global, using textmate's "find in project") and call it a day.
There are situations where I think in/transclusions might be handy in text files apart from cases like you mention it, but with something like this, it works.
You could also, if all that you're including with php are flat files, just find and replace the include statements in project. That is, if there aren't too many of them.
Cheers, tycho
On 28/08/2008, at 9:32 AM, Patrick James wrote:
Hi
I'm not as proficient with text editors as many on this list.
BBEdit has a very handy thing called "Includes"
The easiest way for me to describe them is simply to copy and paste from BBEdit help:
An include file, or just an "include," is a special form of
placeholder whose substitution happens to be the contents of another file. If you have used C or certain other programming languages, you may already be familiar with the concept. Using includes, you can reuse standard bits of text content or HTML markup in several templates or clippings entries without having to revise all of those individual files whenever you revise the included text. Apologies for not only mentioning BBEdit but pasting in something from the help :)
The reason I want to use includes like this now is that I have quite a large web-site which uses PHP includes a lot.
I have been asked to put this web-site on a CD and of course the problem is that a CD doesn't have any PHP.
So, as you have probably guessed, I need to convert the web-site changing all the PHP includes into the actual chunks of HTML in the files supplying those PHP includes.
I know that with BBEdit I would do a find/replace changing the PHP includes in BBEdit includes and do it that way.
However I haven't used BBEdit for quite a while now because I tend always to use TextMate now of course.
I'm wondering if I can do this in TextMate?
The HTML bundles has a "add persistent include" feature.
All the best
Guido -- Dr Guido Governatori http://www.governatori.ner http://www.governatori.net/TextMate
Thank you :)
Patrick
On 28 Aug 2008, at 02:02, Guido Governatori wrote:
The HTML bundles has a "add persistent include" feature.