|
|
Incorporating data from Movable Type into your Web PagesThis is a kinda tricky one, but it was based on some inspiration I got when working on my Real Life Debt Weblog: could I figure out a way to incorporate weblog data into non-blog pages? The answer is, yes!
For this experiment, I decided that I'd like to have a new sentence on the intuitive systems home page that always showed the two most recent entries in my intuitive life weblog... The first step was to go into the administrative area of Movable Type (a great weblogging tool written by sixapart that I use to run five different weblogs), and click on the "Templates" button on the left, then chose "create new index template". The new page asked for the name of the new template, the target filename, and then offered an input box where I could enter the necessary HTML. I named the template "Latest Entries", the file "latest-entries.html", and added the following to the body: <MTEntries lastn="2">That's all that was necessary to create a new file that is now automatically updated and recreated each time a new weblog entry is submitted. Not too hard, eh? On the index page itself - index.shtml - I added the following few lines of HTML: Don't forget to keep current on my weblog, where my latestIf you check out the index page you'll see that the titles of the weblog entries just magically appear as if they were part of the regular typed-in material rather than automatically generated by Movable Type. This is almost exactly the same technique I used on the Debtfree-Today Web site - a sister site to the real-life-debt site I mentioned earlier - to create an actual boxed element that has the latest five entries neatly listed in clickable form. If you can get this basic last-two-entries working, I'm sure you'll be able to get the more complex solution to rock too.
Related HTML, JavaScript and Web Site Programming articles:
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....
✔ Can I embed a Facebook search box on my blog site?I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...
✔ Can I use CSS for drop shadows on my blog?I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....
✔ How can I embed interactive photo panoramas on my site/blog?I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...
✔ How can I create a Twitter search URL shortcut?I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help
right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
Categorized:
Blogs and Blogging
,
HTML, JavaScript and Web Site Programming
(Article 3683,
Written by Dave Taylor)
Tagged: Previous: Can you prevent people from linking to the media on your Web site? Next: Cover prototype of my latest book: "Creating Cool Web Sites" Reader Comments To Date: 2Josh Carter said, on October 27, 2005 6:20 PM:
Dave, this was a fantastic help! If I had known it was this easy, I would have added this feature to my site ages ago. I had gone down the rabbit hole of writing my own CGI script and everything, then thought, "you know, I bet Dave has a much simpler way of doing this..." So double thanks again.
I do have a comment, now that you mention it!Check This Out Too... |
Recent Entries
Look for Answers
Recommended
All Our Categories
Apple iPad Help
Articles and Reviews Auctions and Online Shopping Blogs and Blogging Building Web Site Traffic Business and Management Computer and Internet Basics d) None of the Above Facebook Help Google Gmail Help Google Plus Help HTML, JavaScript and Web Site Programming Industry News and Trade Shows iPhone and Cell Phone Help iPod, Sony PSP and MP3 Player Help Kindle Fire Help Mac OS X Help Pay Per Click (PPC) Advertising Pinterest Help Search Engine Optimization (SEO) Shell Script Programming Tech Support Video Help The Writing Business Twitter, LinkedIn and Social Network Help Unix and Linux Help Video Game Tips and Help Windows PC Help Find Me on Google+ ADT on G+ |
Great stuff Dave! I've been planning to do this for months but procrastinated because I didn't know how to pull it off. Once again, you've made life easier for me and about a million others. Thanks for another way to make our sites better!
Don Crowther, http://101PublicRelations.com