As I was starting a follow-up entry on the Adaptive Path redesign, Jay Allen posted a comment under Wednesday’s entry in response to another reader’s question. In an earlier comment, Leonya wrote:
It would also be great to see some technical details about the programming side — MT plugins used, tricks, etc. I’m doing development with MT, so such details can be very helpful.
To reiterate from Wednesday’s entry, Jay played a major role in building out most of the pages and PHP scripts for the new Adaptive Path site, and also customized AP’s Movable Type setup to generate and publish key portions of the site. He didn’t start out intending to write a long response. But as tends to happen when someone is passionate and knowledgeable about a subject, a lot can be said or written. Whether you use Movable Type or not, the information Jay revealed in his response is too valuable to be left buried in one of the many comments on that entry. So I asked him if I could at least pull it up to it’s own entry, potentially exposing it to a wider audience. He agreed. So here it is, in its entirety:
###
Hey Leonya, most of the backend for Adaptive path is pretty simple right now. The whole site is controlled by four Movable Type blogs: Appearances, Essays, News and static content.
The appearances blog outputs team appearance content on http://www.adaptivepath.com/team/ and http://www.adaptivepath.com/team/appearances.php.
The Essays blog controls output of the individual essays as well as the essays index and the essays archive index. It also produces a listing of the latest essay by each team member on each of their individual pages. Each entry in the blog is a full essay with excerpt and is categorized by author and subject which makes for easy indexing down the road as well as the conditional output to the team members’ pages.
The most exotic wrestling with Movable Type on the AP site is the news blog which contains all of the other dynamic content on the site (including Articles Elsewhere, Essay Announcement, Interview and News). These seemingly disparate types of information are output differentially using categories (as with the team members essays).
The static content blog is something I started doing recently with Jad Fair (http://www.jadfair.com). Essentially the blog contains no entries, but only templates and template modules. In a perfect world (which AP will reach when we finish up later this year), every single piece of static text and all image tags will be editable through the Movable Type interface obviating the need for anyone to go in an edit files on the file system or to hunt through hundreds of Movable Type templates.
With Jad Fair, I made a gateway page with direct links into every part of the system that Jad would have to use (screenshot). This was important because Jad’s system is even more complicated than the Adaptive Path site is currently and Jad is a novice when it comes to web design so I didn’t want to present him with a very steep learning curve.
If you look at the screen shot, you’ll notice that from that page, Jad can not only access every part of his site, but can also get many different views of all of the entries in the system in every blog. There are also links to create new entries and, in the static content section, links to each template module containing static text. This is essentially what will happen later with Adaptive Path.
We also strived to keep repeating elements out of the templates so every page sets a certain number of variables (main/sub page flag, layout type, and title) and includes the header, footer, announcement box and mailing list box via PHP.
The header file is not static HTML but in fact a full-blown PHP script which sets up functions for use throughout the site and handles differential HTML output between sections as well as top-level pages vs. subpages (e.g. /team vs /team/veen.php) and more…
Lastly the announcement box is a nice piece of coding which essentially dynamically outputs the most important announcement relevant to the current section being viewed. The script initially searches for the top-level (site-wide) announcement file in the web document root directory. If it exists, the contents are read and displayed as the PHP include on a site-wide basis.
If the top-level announcement file does not exist then the top-level section directory is searched next. For instance, if you are loading this essay, then the script would look in the /publications directory for an announcement box relevant to the publications section and that would be displayed regardless of how deeply you descend in that section.
In this way, each section can have its own custom announcement box, or, if there is really big news, they can all be overridden by the main announcement box file.
Needless to say, all of these files can be edited via the static content blog described above.
There are many other things in store for Adaptive Path later in the year, but I’m not going to give away any surprises at the moment. Eventually, as soon as I get some time NOT developing sites, I’ll write up a lot of these things that I do with each client in an article in an online web design zine to be named. I will also explain how, with my most recent client, I pulled together the Movable Type and phpBB user authentication systems for a universal login and seamless integration on the site. Fun stuff!
In closing, I will say that a large part of making PHP and Movable Type work for clients is customizing the MT interface for their needs and making things drop dead simple. After development has ended, my account becomes the administrator account and can be used to control everything and anything but is rarely accessed. All user accounts are set up with permissions to do only the things that are necessary for each blog. On a blog with no categories, no one has permission to edit categories. On the static blog, the only two actions available to people are template editing and rebuilding. This strips down the interface to the bare essentials. Of course, in the case that a gateway page exists, it’s hardly necessary to even navigate with the MT system itself since all links are direct links to the parts of the system needed.
That’s all folks!
[Originally posted by Jay Allen as Comment #80 on a July 9 entry.]
29 comments
Dave Manelski 5 years ago
This may sound like a very basic question but I am having trouble finding an easy answer. I am developing a website using MT with many static and dynamic pages. How do I link titles from different blogs onto say the homepage of the site (a floating announcement box) if the homepage is part of a different blog on the same system? I know this is a very basic question but if anyone could point me in the right direction, that would be great. Thanks in advance.
Leonya 5 years ago
Global Listings plugin will do exactly the thing.
Jesper 5 years ago
MovableType, not MoveableType [sic].
Jay Allen 5 years ago
By the way, to answer a part of Leonya’s question that I missed: No plugins or hacks of the source code were necessary to implement the current site. AP has SmartyPants installed, but that is simply for text-formatting inthe essays. Everything else is done with an out-of-the-box configuration.
And yes, Jesper, Movable Type is more correct than Moveable Type. Now is that all you had to contribute to the discussion??
Paul Michael Smith 5 years ago
Great Info there! Thanks.
Did you pay a commercial lisence fee for the use of MovableType ?
Ken Walker 5 years ago
“I will also explain how, with my most recent client, I pulled together the Moveable Type and phpBB user authentication systems for a universal login and seamless integration on the site.”
Hi Jay. Um, will you be setting up a mailing list for the announcement of this as-yet-unnamed webzine? ;-)
Jay Allen 5 years ago
Paul: Did you pay a commercial lisence fee for the use of MovableType ?
No, but Adaptive Path did.
Ken Walker: Hi Jay. Um, will you be setting up a mailing list for the announcement of this as-yet-unnamed webzine? ;-)
Perhaps I misspoke. I’m not starting a webzine. I just simply haven’t written this stuff up in a publishable fashion nor have I solicited the usual suspects (ALA, O’Reilly, DevShed, Webmonkey, etc) for the piece. I know that it will be valuable, especially when I get into things like creating a catalog or a photolog. Best practices sorts of stuff.
With all the work, recently, I just simply haven’t had time. I’d say read my site, but that too has suffered from my lack of time. After my current project, I will be taking a few months off during which I will reassemble my site and do some geek writing.
Paul Michael Smith 5 years ago
Cool. I didn’t mean to insult your intelligence by asking that but it something that could be overlooked. ;-) MT is incredibily powerful when combined with clever php and good planning.
Jesper 5 years ago
Jay: No, but I had little time on my hands, and I figured I might post that first.
The MT setup seems like a good mix, and I enjoyed reading about some of the PHP tricks. I’m about to start another complicated site that I know will be powered by several MT logs, and this proves handy as inspiration. I really dig your idea of having MT serve up all text pieces so you can edit it all in the same place.
huphtur 5 years ago
Jay: this has nothing to do with this subject, but when I visit your website, and roll over any of the 4 images on the homepage, it crashes my firebird (0.6) browser. I tried it a couple times (even rebooted my computer) it kept doing it.
Jay Allen 5 years ago
Paul, no offense taken.
Jesper, indeed. I don’t know why I didn’t think of it when MT first came out, but it’s indispensible to me now.
By the way, in case it was unclear, I make a separate static content blog only to make matters simple. One could certainly set up static content template modules in each blog, but then you start to create problems.
1) If your text is somewhere above the Local Site Path, then you have to use absolute paths or ../ relative paths in the output filename. My static content blog has the document root as it’s local site path.
2) The static content blog is just that: STATIC. It doesn’t need to be rebuilt every time you add an entry. Keeping static content inside dynamic blogs (i.e. ones with entries) slows down the rebuilding process.
3) Dynamic blogs already have enough templates to deal with usually. There is no need for ten others with static content. That’s highly confusing for the client.
Jay Allen 5 years ago
Ahh, one more thing I didn’t mention before. In addition to a gateway page into MT, there’s nothing wrong with putting those same links directly on the site so they can be edited nearly in place!
Here’s a screenshot, again of Jad Fair’s site, with the administrator links (all blue) turned on. The edit links below each entry go directly to the entry editing screen for that entry. The edit link on the sidebar links to the static content template module for that piece of content. The post new entry does precisely what you think it might. The control panel link goes to the gateway page and shows up on every single page of the site when the links are turned on.
Like the edit links I put into MT-Search (either adapted from an idea David Raynes had or vice versa), the links are cookie-based and can be turned on an off at will via the gateway page (see the toggle at the very top of the gateway page screen shot mentioned earlier).
Yeah, okay, so I probably forgot the coolest thing. Isn’t this always the way with top-of-the-head writing?
Jay Allen 5 years ago
huphtur, why would anyone want to visit my website? Everything except one section is down. It’s an unmaintained ghost town over there! ;-)
I’ll look into it. Thanks.
Jesper 5 years ago
Jay, those edit links are lovely. Dave Winer would love that. ;)
John W. 5 years ago
How are the links within the website (to edit content in MT), secure from the public?
I don’t understand what allows HIM to see the links, while others can not. Could you explain this?
Thanks, and I must say, you’ve both done a great job on Adaptive!
Jay Allen 5 years ago
Well, a simple cookie is all it takes to differentiate between someone who can see links and someone who cannot. In fact, the cookie is set by simply visiting the gateway page (which is not password protected, I might add).
What makes it secure is that if you are not logged into Movable Type, or have the auto-login cookie (by clicking Remember Me upon login), all you would get by clicking any edit link on the site or the gateway page is a Movable Type login screen.
These links are simply shortcuts. The security is still handled by MT.
jazer 5 years ago
I’m not quite sure I understand how the ’static’ blog works. If there are no entries, where is the content stored?
Thank you, Jay (and Doug), for all the info about this project!
Jay Allen 5 years ago
The two main uses of the static blog are to output static pages and to output static portions of dynamic pages. The way its done for the two is different.
For static pages (like perhaps an about, or a contact page), I design the page, remove footers and headers and common elements that I call from a main site configuration file (which I refer to in my original post). Then I save what is left as an index template.
After that, I extract all pieces of text from the index template and replace them with MTInclude tags to the template modules which will hold the text.
At the end, between the header/footer/repeating elements that are handled by the site config file and the template module includes for the text, the index template is pretty bare.
By doing this, the user can edit the text through the template module or change the whole look or layout of the site through the site configuration file!
Including static text on a dynamic page is a bit less heady. I link the template modules to a file on the file system, and then include the file in the appropriate place via PHP include().
Just to keep things neat, I usually put all of these fragments hierarchically below /includes/pub. For instance, if there is a piece of text on the essays page (at /essays/*) I’ll usually write the file to /includes/pub/essays/ and give it a good descriptive name.
So anyhow, that’s how I do it…
Michael Schmidt 5 years ago
Thanks for sharing these neat tricks. I love the administrator links idea. I saw that first on Typo3 and thought that it would be great to have that feature in MT too. I didn’t think it would be so easy to replicate…
I’m using MT in a similar fashion and it’s almost perfect. My only problem is that my clients usually don’t post “blog entries” but events, reviews, announcements etc. and I often have to creatively misuse the entry fields for a different purpose. It’s always hard to tell them that the “Location” has to go in the Excerpt field… I’m praying that there will be the possibility to rename/redefine the content elements for a blog in MTPro. ;)
I’m interessted to hear how you approach that problem.
Fred Smith 5 years ago
First, don’t get me wrong. I love the Adaptive Path site, as I love all of your other sites.
However, I don’t understand what all of the hype over your new site is about. Sure, it doesn’t use tables, which is great, but lots of designs don’t use tables. The actual design is nice, but lots of other sites also have nice designs.
What’s the deal? It seems like every blog I read has twenty links to your new design. I designed a pretty site without tables too. Why is it not all over blogdex?
Jay Allen 5 years ago
Michael wrote: My only problem is that my clients usually don’t post “blog entries” but events, reviews, announcements etc. and I often have to creatively misuse the entry fields for a different purpose. It’s always hard to tell them that the “Location” has to go in the Excerpt field… I’m interessted to hear how you approach that problem.
Michael, I can’t tell you how many times I’ve run into this problem. In the beginning, I made things a bit better by changing the welcome message on the blog to list a key to entries. In other words:
Entry body: text 1
Entry additional text: text 2
Entry excerpt: text 3
However, that’s not perfect because when one is entering an entry, the welcome message can’t be seen.
I thought about hacking the templates to change the names, but two things stopped me. 1) Hacked templates get overwritten on upgrades and 2) I figured that displaying help/title text differentially depending on which blog page is being assembled was either beyond the templates capabilities or a HUGE hack….
What I’m doing currently for a client is using Brad Choate’s Key/Values plugin to overload the proper fields and then making a separate add/edit entry page for the complicated blog which uses the MT XML-RPC API to work with MT.
In this way, you can easily create a “catalog blog” with many many fields without strectching MT so far as to break it, metaphorically at least… So far, so good.
Mike 5 years ago
Fred:
I think the greatest reason behind everyone’s blog linking to stopdesign or adaptive path is because of Doug Bowman (stopdesign himself) and exactly what kind of a company adaptive path is.
Anyone who considers themself a web designer thinks that Doug’s designs rock (check out his CSS Zen Garden entry if you don’t agree).
But the main point is that a hero in the web community redesigned the website for a consulting firm who is a hero in the usability and accessibility industry. Many of the world’s top usability experts work at adaptive path, and because they were the ones who redesigned its guaranteed to generate a lot of fanfair.
The same type of press would have gone to Cooper if it was all done in XHTML and CSS, and if someone like Doug or Jeffrey Zeldman had done it. But because it wasn’t redesigned to be ultra standards-compliant, its redesign wasn’t as well publicized and talked about as adaptive path’s was.
All in all, the combination of stopdesign and adaptive path definitely gets web designers turning their heads, and when another company of this magnitude and stature undergoes a standards-compliant redesign, it’ll get noticed as well.
Cameron 5 years ago
I was just going to suggest the key value plugin, but I can see you’re one step Jay. Any refrences on how to go about making that seperate page to edit custom entries? Are you customizing MT’s admin templates, or using your own forms?
Installing/hacking MT is about the extent of my development abilities so any guidance would be appreciated.
Also, I should mention that there is an excellent desktop tool called Zempt that is under Development. I’ve suggested that it would be a great feature to allow custom entry profiles so that you can specify the fields you want and have all the Key Values stuff be transparent to the user. For more info, or better yet to chime in and let the developers know this would be a killer feature, check out the forum thread.
Michael Schmidt 5 years ago
Jay:
Ah, I see. I’m already using the Key/Values plugin but didn’t think about recreating my own input form. I might give it a try. Thanks for the hint.
Jay Allen 5 years ago
Brad Choate outdoes me nicely on the static content blog with searchability. Go read…
Jay Allen 5 years ago
Actually, on second thought, I am not so sure that I like the above for client work. The reason is that I always make full pages templates and the text blurbs on them easy-to-edit template modules.
While Brad’s solution is perfect for personal or techie use, it does nothing to help a client easily update website copy…
Unless of course, anyone can think of a way around that. There is Adam Kalsey’s Process Tags plugin with which one could put the text blurbs into template modules and include them into entries, but then you will still be excluding them from search which is the major benefit of Brad’s method. If you exclude all of the text on a page, from the search, then what good is it?
Thinking…..
dogfood 5 years ago
from a MT-beginner…
1/ what’s the reason to split the AP-site into different blogs? the use of different layouts for each blog/web-site-section?
2/ i’m overwhelmed by the vast amount of infos in the web about MT. is there any good site/link/source which delivers not MT-hacks, but conceptual approaches for MT? (when to split a site into different blogs, when to start using template-modules for editing etc…)
Mean Dean 5 years ago
Jay,
I hope you don’t mind. but your beginner (dogfood) and a few others want to know where to get started. So did I back in October’02 when it dawned on me that you could use MT as a CMS. I’ve created a short list of links, a summer reading list if you will, on various topics that helped get me over the hump when deploying MT as a CMS for a church web site I maintain.
On another note. I both agree and disagree with your point made on Brad’s site regarding categories as subdirectories versus coded fields in the Entry More field. While I do use categories as subdirs, I would suggest using the Keywords field instead. I have an abbreviated example of how I did it using PHP on my site, though using Brad’s MT-Perl will get it done just as nice.
That said, glad to see this topic covered as thoroughly as you have.
joel 5 years ago
I have just shamelessly stolen the embedded admin links idea, as well as the central admin-links area idea — thanks for the great ideas!
One thing I did in addition to all this was to make a bookmarklet that our editors can use to quickly toggle links on and off. It’s very simple (wrapping added by me):
javascript:document.location.href=’http://example.com/toggle_cookie.php
?whereto=’+document.location.href;
toggle_cookie.php simply reads the cookie and toggles it (”on”, or “off”), then redirects the browser back to the page you were browsing (via the whereto GET variable). Makes it handy for editors to turn links on or off with one click to their bookmarks toolbar.