Search

Phrase

Display

 

Category

   

Order

 

Pagesize

Results

28 hits12

1. Colors - Experimenting With, Using MTSetVar and MTGetVar

Learning Movable Type, Tutorials, 26 KB, 1159 words

The default Movable Type styles use color schemes in which certain colors are repeated in different style elements throughout the stylesheet. For example, the Independence style uses the same color red (#B22222) for the banner background color, the link hover color, the content h2, the calendar caption, and the sidebar h2 and border colors. In the comments section of the LMT tutorial Colors - Background, Banner, Headline, and Font, developer Brad Choate remarked that you could easily use the MTSetVar tag to define a color and the top of your stylesheet, and use the MTGetVar tag throughout your stylesheet wherever you wanted that color to be used. This works because the stylesheet is a...

continue reading ...

2. MTGetVar

Six Apart User Manual, Manuals, 20 KB, 265 words

MTGetVar

Displays the current value of a variable set by MTSetVar.

Attributes: • name - The name of the variable.

Permalink

...

continue reading ...

3. Build Conditions with the Compare Plugin

Movable Type Weblog, Tutorials, 22 KB, 1097 words

In Comparison needed for conditional Generation I showed how to use the Compare Plugin for managing variations of a page type. The plugin allows comparing values and optionally inserting one or the other code segment into the output stream. However, the simple condition "if one value equals another value" is just the beginning. We are also able to create complex conditions. It is not even that difficult.

Basics

The Compare Plugin offers a number of tags, as for example MTIfEqual, MTIfNotEqual, MTIfGreater, MTIfGreaterOrEqual, MTIfLess, etc. Most of them work the same way: they take at least two mandatory attributes, a and b. The plugin compares the values of those two...

continue reading ...

4. FAQ: Entries or Comments with alternating Style

Movable Type Weblog, Tutorials, 23 KB, 1171 words

Question

In Movable Type, entries or comments or other objects are often shown in lists. For example, the main index shows the most recent entries, a category archive also shows entries, or an individual entry archive shows comments. I preferred if not all items in such lists were styled the same. For example, there should be an alternating white / gray background. How can this be done?

Answer

Fortunately, the answer can be given in a generic way. The technique that I am going to show can be used with all types of objects (entries, comments, categories, etc.) and any number of different styles.

For showing the basic idea I will create a list of entries using 3 different styles....

continue reading ...

5. Grouping a List of Entries by Month

Movable Type Weblog, Tutorials, 29 KB, 1997 words

It is a common scenario to have a list of entries sorted by date of publication. As this list may be rather long, it is reasonable to group entries and mark each group with a distinct group header. If you want to group by day, you can use the MTDateHeader tag for this task. However, what can be done, if you prefer to group by months?

An example

Suppose you have a couple of entries. Then you might want to create a structured list as follows:

Jan 16th, 2005 - First entry from Jan 16th, 2005 - Second entry from Jan 16th, 2005 - Third entry from Jan 16th, 2005 Jan 20th, 2005 - First entry from Jan 20th, 2005 - Second entry from Jan 20th, 2005 Feb 3rd, 2005 - First entry from...

continue reading ...

6. Movalog: Templates Archives

Movalog, Tutorials, 27 KB, 1008 words

Page: 1 2 2 Pages.

Publishing Custom Pages with Movable Type

MT has had the ability to output any content in a template since version 1.0 in 2001, however it doesn't have the "push button" simplicity of Wordpress' Pages feature. For those of you unfamiliar with Wordpress, its Pages feature allows...

Continue reading "Publishing Custom Pages with Movable Type"

Posted on 08/02/2005 | Permalink | Comments (2)

Ajax Archive Drop Downs

In this thread, Gary highlighted how to have drop downs of archives that basically redirected to the appropriate page once an archive was chosen. With this tutorial, I'll take that one step further and use...

continue reading ...

7. Colors - Background, Banner, Headline, and Font

Learning Movable Type, Tutorials, 22 KB, 1118 words

The first thing you might want to do when customizing your Movable Type blog style is to change the color of the background, banner, headlines, or text. This is pretty easy to do; the adjustments are made in your weblog's stylesheet template.

Before you start, you should have a basic understanding of how colors are coded into a web page. Open up your stylesheet from the templates menu in your MT edit screen. If you scroll down you will see several instances of the word "color" followed by a # sign and six characters comprised of letters and or numbers. These six characters represent a color; the first 2 characters affect the RED tones of RGB, the third and fourth characters...

continue reading ...

9. Yearly Archives

Movalog, Tutorials, 33 KB, 1200 words

One feature I find lacking in MT is yearly archives. A yearly archive basically is just a page of twelve calendars - one for each month of the year - see mine in action here with permalinks to the days.

Now there are two ways you can do this, one easier than the other. The first - harder - way to do it is installing Brad Choate's PerlScript Plugin and then follow the steps he has laid out here. I call this the harder method because for every year you are blogging you need to create a new index template and call the template module.

The second method, all you need to do is setup the archiving and MT will do a lot for you - including tidying up you monthly archive list ! You will need...

continue reading ...

10. Simple Template

Brad Choate, Plugins, 57 KB, 1790 words

Movable Type templates aren't too difficult to write, but they can be difficult to read. So I've whipped up another plugin to fix that. Simple Template is a plugin that provides an alternative syntax for Movable Type templates 1.

Availability

You can download this plugin here: mtsimpletemplate-1_21.zip

Installation

To install, place the ‘simpletemplate.pl' file in your Movable...

continue reading ...

11. Yearly Archives

Learning Movable Type, Tutorials, 32 KB, 1676 words

Movable Type is set up for doing date-based archives by day, week, and month, but not by year. There are a few plugins and methods out there that will help you create a yearly calendar of your archives, for example, Brad Choate's Year Archives in MT Perl script plugin will produce a calendar archive ( example). Lummox JR's ArchiveYear plugin will produce a similar calendar ( example).

I prefer a yearly archive to show a list of entries by month, as I've set up on one of my blogs ( example). An archive page like this can be accomplished using the ArchiveYear plugin with some simple changes to the sample code given. Update August 1, 2005 The ArchiveYear plugin seems to not be in its...

continue reading ...

12. Compare

Staggernation, Plugins, 12 KB, 1043 words

This Movable Type plugin implements a set of template tags for displaying a portion of a template conditionally, depending on the results of a comparison between values. The values compared can be literal strings or numbers, or they can be pieces of MT template code that the plugin will build and evaluate, using the result in the comparison.

MT users have developed a number of techniques in PHP and JavaScript to implement various useful conditional-display features on MT-based sites. The tags in the Compare plugin should let you accomplish many of these same tasks within your MT templates, without using PHP or JavaScript tricks. For example: • Display different text in the Comments link for...

continue reading ...

13. A Tag within a Tag

Movable Type Weblog, Tutorials, 21 KB, 1106 words

In Movable Type, we use tags for defining the flow within a template and for accessing the database. You can influence a tag's behavior with the help of attributes. These attributes define a value for some parameter.

Unfortunately, the value for an attribute may only be a constant. However, you will sometimes have the need for setting the value to the result of another tag. Movable Type will not support such a situation, but a plugin will help.

An Example

Suppose you have a template module that you want to include from many different places. For example, you want to call this module from both an individual entry archive and the main index. Inside the template, you then want to...

continue reading ...

14. 1.4 (2002.01.07)

Six Apart User Manual, Manuals, 26 KB, 950 words

1.4 (2002.01.07)

• New default templates no longer use <label> tag in the Remember info? checkbox for the ``remember me'' JS, because it was breaking XHTML validation. • Fixed Linked File Templates so that, when linking a template to a new file that doesn't yet exist, the permissions will be set correctly (based on umask settings in mt.cfg). • Added new default templates and made them customizable by stylesheets. • Added the Comment Error Template to specify the layout of the page a user receives when there is an error with his/her...

continue reading ...

15. Utility Archives

Six Apart User Manual, Manuals, 25 KB, 521 words

The current date and time at publishing. Date format tags may be applied with the format attribute along with the language attribute. See Appendix C.

Back to top | Permalink | Comments (0)

MTElse

...

continue reading ...

16. Easy Amazon Links

Brad Choate, Tutorials, 45 KB, 948 words

If you're lazy like me, you'd like to link to Amazon items and put your associate ID in there, but who remembers that URL format? With publishing systems like Movable Type, you shouldn't have to remember, so let's make MT do the work for us.

Ingredients: • 1 MT-Macro plugin • 1 MT-IfEmpty plugin • 1 MT-Regex plugin

Technique:

Define a pattern to match the Amazon URL (today they use the www.amazon.com/exec/obidos/tg/detail/-/ASINCODE/… So we use this to transform the regular Amazon link into an associate link: <$MTSetVar name="amazon_id"...

continue reading ...

17. Variables and Conditional Display

Movalog, Tutorials, 26 KB, 654 words

Two of the most powerful and probably the least widely used tags in Movable Type are MTSetVar and MTGetVar. These tags allow you to set and get a variable like so <MTSetVar name="foo" value="bar"> <MTGetVar name="foo">

and can be used for a great variety of uses. If you use PHP, this can be done in a much easier way like so

<?php $foo = "bar"; ?>

and you can get the value of that variable by just using $foo within a block of PHP code (this method is more powerful than using MTSet/GetVar because you can use MT tags within PHP.)

Using MTSet/GetVar (or manually setting the variable in PHP) has several uses. Elise covered one of them with her tutorial on font colors but you can use them in several ways, especially in cases in which you would like a conditional display. A conditional display is a visual display that changes when certain conditions occur....

continue reading ...

18. 3.2 (2005.08.25)

Six Apart User Manual, Manuals, 45 KB, 3336 words

3.2 (2005.08.25)

Major Features

• New dead-simple AJAX-powered installation/upgrade process (see screencast demo) which replaces mt-load.cgi and all mt-upgrade* scripts. Also eliminated the upgrade distribution since only the config file would be different. • Combined mt.cfg and mt-db-pass.cgi into mt-config.cgi. Shipping as mt-config.cgi-original so as to prevent overwriting when upgrading. • Introduced the new System Overview section which allows administrators to configure and manage aspects of the system across all weblogs • Introduced a plugin-based feedback rating framework which scores comments and TrackBacks upon submission on a scale from -10 (least desirable) to 10 (most desirable)...

continue reading ...

20. FAQ: Different Templates for different Categories

Movable Type Weblog, Tutorials, 18 KB, 607 words

Question

I have a couple of categories. I preferred if entries belonging to one category were styled in a different way than entries belonging to another category. Can I have per category templates?

Answer

Movable Type does not allow this right out of the box. However, there are a couple of ways for achieving this behavior.

You can use the Supplemental Category Tags. This is a collection of several category-related tags. Among others, the collection also contains the »MTIfCategory« and »MTIfPrimaryCategory« tags for creating a condition based on an entry's category.

On MT Extensions, Per Category Templates you can read a tip about how to use the...

continue reading ...

Comments

You want to post some comment? Please use the announcement post on the Movable Type Weblog.

If you want to give some feedback concerning a specific query, please use the feedback button that is shown after a search has completed.

mgs | September 27th 2005