Google
 
Web www.culturekitchen.com

August 09, 2003

template modules
by Liza Sabater

TypePad User Group :: View Forum - Tips and Tricks

While fiddling around with my TYPEPAD template, I noticed that, just like in MOVABLETYPE, I have the option of creating a template module. Now, I read and re-read the MT manual but for the life of me, I could not understand for the life of me how to use them. It basically has taken me to use TYPEPAD to better understand MOVABLETYPE.

I had created an advanced version of my current template. There I noticed that the sidebars for this blog are actually not coded directly into the INDEX template. They are files that are embedded into the main index file.


<||div id="left">
<||!--#include virtual="<$MTBlogRelativeURL$>sidebar1.inc"-->
<||/div>


Then, upon further inspection, I noticed that within these sidebars the TYPELISTS are embedded as so:

<||!--#include virtual="/lists/news/module.inc"-->

(*Note: I had to put these marks "||" at the beginning of the code in order to disable it and make it readable on the browser.)

I would have thought I'd "get it" easily but alas, I can be slow with these things. It took me three blinks of the eye to get that what I saw above was similar to what I read on the ADVANCED TEMPLATES webpage:

What are Template Modules?

Template Modules allow you to re-use pieces of content and TypePad template tags throughout your site, but store them in one place, making updates easy. You can include them using the <||MTInclude> tag.

Well, I have tried it out and it's fabulous.

If you create a BOOK/MOVIE/MUSIC TYPELIST with TYPEPAD, it will automatically look for the product on AMAZON and create a link to the merchandise. Now, I don't have a problem pluggin a product, especially if I like it, but I do have a problem having only the choice of using Amazon. As any good New Yorker know, Barnes and Noble started here in the city and, like any good NYC vendor, it will deliver to your door anywhere in New York City on the same day if you post your order before 11am. Can't beat that!

So, in order to create my own TYPELIST, I have to create a module from SCRATCH. It is more time-consuming than going along with AMAZON but, really, AMAZON is to B&N what PCs are to MACs. Gotta go with the "David" on this one.

So, you will need a TYPEPAD PRO account in order to use this feature:

(1) Take your current template set and clone it with the CONVERT.

Once it has made your clone, it will appear in the ADVANCED template set section.

(2) Click on its name or on EDIT.

You will see your template set: Archive Index, Main Index, RSS Template, Stylesheet, and sidebars 1 and/or 2 (depending on whether you have 2 or three columns).

(3) Go to the end of the page and click on CREATE NEW TEMPLATE MODULE.

This will open up a window. Call it test and copy and paste the following code (TAKE THE ## AFTER EACH FIRST "<"):

<##IMG SRC="http://service.bfast.com/bfast/Serve?bfmid=2181&sourceid=40465604&bfpid=0782141846&bfmtype=book"
BORDER="0" WIDTH="1" HEIGHT="1" NOSAVE >
<##A HREF="http://service.bfast.com/bfast/click?bfmid=2181&sourceid=40465604&bfpid=0782141846&bfmtype=book"
TARGET="_top">
<##IMG SRC="http://images.barnesandnoble.com/images/6340000/6343594.gif "
BORDER="0" ALIGN="center" ALT="Cascading Style Sheets: The Designer's Edge">

Cascading Style Sheets: The Designer's Edge

(4) Hit Save.

Now go to any of your sidebars. You are going to include this at the top of the sidebar but right after the "div class="sidebar" piece of code.

(5) Embed the new BOOK MODULE by using the MTInclude tag (make sure you take out the #):

<#h2>BOOKS
<#br />
<#MTInclude module="books">

(6) SAVE and REBUILD your site and, VOILA! you have your book module working.

Play with it. I'm really excited because that means that all I have to change now is the module. Every time I add something to it, save and rebuild, my blog will be immediately updated without having to fiddle around with the main index template (and risk effing it up).

LOVE IT!

Posted by Liza Sabater in Blogs, Design
Permalink | Comments (3) | TrackBack (3) | Technorati Cosmos





Trackbacks

Trackback for this post:
http://www.culturekitchen.com/cgi-bin/movabletype/mt-tb.cgi/241

The following blogs make reference to this post :

» Liza Sabater How-To: Template Modules from Channeling Cupertino
b u r u n d a n g a: template modules Liza dives deep into TypePad and shows you how to roll your own TypeLists, including pointing to content at stores other than Amazon. Guess I'll have to go [More...]

Found inSeptember 20, 2003 05:08 AM

» Template module tips for TypePad from Radio Free Blogistan
TypePadista community catalyst and culture kitchen creator Liza Sabater is having a ball with TypePad and documenting what she learns as she goes on her TP blog, burudanga. In fact, I may have to add burudanga to my short sidebar of other metablog feed... [More...]

Found inSeptember 23, 2003 01:36 PM

» Stop Subliminal Messages in the Workplace from Melissa
Help us stop subliminal mind control machines from being imbedded in the workplace! [More...]

Found inJune 21, 2005 10:48 PM


Say it loud, say it proud!

1

Comment by: Richard Silverstein at August 17, 2003 07:35 PM

Liza: I too hate the Amazon marketing juggernaught & wanted to give a little help to the little guy in my Typelist, but I solved my problem a bit differently than you. I'm still using the regular TP Typelist format, but I'm plugging CDs for a small world music etailer, CdRoots on my blog. You can take a look at how I've done it on my blog.

I don't know code nearly as well as you & I'm sure your solution is more sophisticated than mine. But just wanted you to know that there are a few ways to skin this cat.

The one thing I noticed that I have to change is that I've linked to album cover art jpgs at the All Music Guide website, rather than uploading the jpgs to TP. This is slowing down my download for viewing so I'll have to upload those jpgs to TP.

Very gripping reading about the blackout. My wife & I are native NYers (Janis lived in Brooklyn & Manhattan for nearly 15 yrs.) & just visited last month. can't begin to imagine how stressful it must've been for you all. "Be strong & of good courage."

 

2

Comment by: xian at September 23, 2003 01:29 PM

Liza, I agree with the dude from Channeling Cupertino. There ought to be a Movable Type (and TypePad) Hacks book, and you should write it, or at least a big chunk of it. It would be nice to have Scriptygoddess and Brad Choate involved as well, and since O'Reilly was doing a Blog Hacks book with Ben Hammersley before they got cold feet about publishing "yet another" product-general blog book, I bet Ben has a good stockpile of MT tips as well.

O'Reilly may still be blog shy, but I'd be happy to pitch this to them for you if you're interested, and if they don't bite, I bet another publisher might be interested under a somewhat different title.

 

3

Comment by: Will Parker at October 7, 2003 02:42 PM

"Liza, I agree with the dude from Channeling Cupertino. ..."

I am not a dude; I am a free number!

If you take up Xian's offer to pitch the Moveable Hacks book, I'll volunteer to be the MT newbie tester for any hacks you might want to try out on an unsuspecting populace. I find bugs for a living, so I can promise you high-quality bug reports.

-Will

 

C'mon baby, don't be shy










Remember personal info?