There’s always something to howl about.

Speaking in tongues just for Cheryl Johnson: Building content-rich custom web sites in PHP

The deafening clamor in my mailbox suggests that almost nobody is interested in what I have to say about using PHP to automate weblog and web site content creation. That’s actually a good sign, in the sense that automated web site creation is one of the key tools we use against our competition in the Phoenix real estate market.

So: I think this might be of interest to Cheryl Johnson only.

Take a look, Cheryl:

<!--index.php-->

<?PHP $thepath=$_SERVER['SERVER_NAME']; ?>
<?PHP include ("http://$thepath/pageCap.php");?>

<title>A Street</title>

<?PHP include ("http://$thepath/pageTop.php");?>

<?PHP include("links.php"); ?>


<iframe src="main.php" frameborder="0" width="650"
height="650" name="main.php" scrolling="no">
</iframe>

<?PHP include ("http://$thepath/pageBot.php");?>


<!--<p class="h1">A Street</p>-->

This is the index page for a top level page in a BloodhoundRealty.com slide show. Almost a year ago, I talked about how we do these, and I linked to a demonstration at the time — although all of our single-property web sites and most of our previewing and staging web sites and other photographic demonstrations are based on the Slide Show Marge technology.

Note that this is entirely modular. The “included” files named pageXxx.php are all standing components at the top level of the file server. They consist simply of the plain vanilla HTML needed to make that part of the page.

The index.php file and the other two “included” files are generated by the software at run-time and are stored together at that particular level of the hierarchy:

<!--main.php-->

<p class="h1">A Street</p>

That’s the top level of the slide show. There can be a photo and descriptive text here, too.

And these are the subfolders linked below this level in the hierarchy:

<!--links.php-->

<?PHP $thepath=$_SERVER['SERVER_NAME']; ?>

<?PHP include("http://$thepath/pageLink.php"); ?>

<p class="body" style="width: 600px">
<a href="2 A St/index2.php"
	target="main.php">2 A St</a>&nbsp;| 
<a href="4 A St/index2.php"
	target="main.php">4 A St</a>&nbsp;| 
<a href="8 A St/index2.php"
	target="main.php">8 A St</a>&nbsp;| 
<a href="main.php"
	target="main.php">Return&nbsp;to
	Home&nbsp;Page</a>
</p>

Because we’re built out of an iframe, each one of these subfolders opens up as a slide show within the iframe. Each of those subfolders has its own variations of the files shown here.

I first wrote about this style of building web pages in August of 2006. At the time, a still-encloaked 4Realz wondered why I didn’t use the WordPress “Pages” technology instead. A WordPress “Page” is an excellent way to build a static page that anyone on your team can edit. We were playing with the idea of a blogsite at that time (and still are, in our dilatory way, while Jimmy Tomatoes has built an empire out of the idea). WordPress “Pages” are the perfect way to build a blogsite, and a blogsite is the perfect solution to the problem of how to build a Realtor’s client-focused, lead-seeking web site.

So what’s the point of building modular, static web pages like this instead?

To build them with software. A static web page is build manually. A WordPress “Page” is built manually. These pages are built at incredible speed by Slide Show Marge.

Our slide show sites are built from (folders of) folders of photos. Working from the bottom up, Slide Show Marge creates a web page of each folder of photos, then creates an index of each folder of folders. We have to manually write headlines, body text and photo captions (although even some of that is automated), but the rest of the work is done by the software. We end up with fully-formed, fully-armed web sites that are lean, mean, error-free, completely modular — and therefore appearance- and file-server-independent — eminently search-engine-friendly and fast and easy for anyone in our (three-person) organization to make.

In fact, for a single-property web site, we always go in and manually tweak the top-level page, adding links that Marge can’t see and customizing the fit and finish. But this is a fraction of the labor it would take to build the whole site by hand.

And, in fact, it would be just as easy to build a site dynamically, generating the pages on the fly rather than building from static files. We do it this way because it’s easier for anyone (meaning not me) to make manual edits to any one of the static pages, where revising the software behind truly dynamic pages usually requires an actual coder (meaning me or, especially, my son Cameron). In other words, we choose to front-load the complexity with an application to make any back-end work simpler. It’s a trade-off. The potentially-canonical list of real estate weblogs, by contrast, is built dynamically, on the fly, from a standing database.

We’re actually rebuilding Slide Show Marge right now, to Cameron’s dismay. We’re revising it to work better with the look and feel of both BloodhoundRealty.com and DistinctivePhoenix.com — and to run from a leaner, CSS-based style of HTML. When we’re done, our sites will look as if they were WordPress “Pages,” and we will gain some dynamic features, particularly page-specific SEO optimization and some flexibility in the sidebar portion of the new pages.

Here’s the payoff for our efforts. We can produce a simple web site — say a summary of previewed homes or staging advice — in maybe ten minutes. A full-blown single-property web site takes me around two hours, including the copy-writing and the manual finessing. We can do a web site so easily that it’s much easier, much more likely to communicate successfully and boundlessly more impressive to clients than trying to do the same work by email. And if no one but Cheryl Johnson is interested — so much the better for us…

 
Getting in touch with your inner geek:

Want more? Real Estate Weblogging 101 will speak to your inner geek. And if you want even more than that, be sure to join us for BloodhoundBlog Unchained.

Technorati Tags: , ,