|
Customization of MovableType
MovableType uses advanced templating system to achieve the high
level customization while maintaining the consistency across the
different sections of the blog. Zubrcom's customization of the
native MT templating system relies on PHP, a powerful embedded
scripting language transparently processed by the servers.
How Templating works
Whenever you publish entry, edit entry or rebuild your blogs, MovableType
merges the text of your posts with the pre-defined templates. The result of
such merge is the posts that you can see in your web browser. It is
important to note that the templating systems are not dynamic. Whenever you
make changes to the template you will need to rebuild the site to have the
changes reflected in the existing postings.
Accessing and Editing Templates in MovableType.
MovableType provides integrated access to the templates via
Templates menu of the MT control panel for the blogs. While the
templates can be edited directly via MT, it is not a method that
Zubrcom recommends since the standard browser based text editing
applications are not easy to use.
Accessing the Templates on Zubrcom servers
Customer's installation of MovableType on Zubrcom servers
includes linked external template files located in the
"mt-templates" directory of the blog tree.
For example, if the customer's account name is "alexey" and
customer's domain name hosting the blog is someblog.com, then the
layout of the directories will be as follows:
"/home/alexey/www/www.someblog.com/docs/" - top of the blog tree
"/home/alexey/www/www.someblog.com/docs/mt-templates" - location of MovableType templates
The following are the standard templates located in the mt-templates
directory:
|
mt-main_index.tmpl
|
template used to build main index
|
|
mt-individ_entry.tmpl
|
template used to build individual articles
|
|
mt-date_archive.tmpl
|
template used to build date-based archive
|
|
mt-category_archive.tmpl
|
template used to build category archive
|
The templates can be edited in your favorite editor on your local system and
uploaded back onto Zubrcom's servers. If your account allows for interactive
access, you can also edit the templates by connecting directly to your shell
account and using one of visual text editors (such as "pico", "joe" or "vi")
available on the server.
Editing Templates on Your Local Computer
You can edit the templates on your local computer and upload them
to the Zubrcom's servers. The following procedure can be used to
accomplish this task
-
Connect to your server using SFTP client (such as CoreFTP) with the
username and password for FTP/SFTP access to the server.
-
Change directory to "www/www.someblog.com/docs/mt-templates"
-
Download the template you want to change (for example
mt-main_index.tmpl) onto your local computer.
-
Open the template with a text editor, such as Notepad.
-
Make the desired changes.
-
Save the template locally.
-
Exit Notepad.
-
Reconnect to your account using SFTP client
-
Change directory to "www/www.someblog.com/docs/mt-templates"
-
Upload the updated template to the server.
-
Rebuild the site using the new template by logging into MovableType,
selecting the appropriate blog, selecting "Rebuild" and choosing
"Rebuild all".
Editing Templates on Zubrcom's Servers
If your account allows interactive access, you can edit the
templates directly on Zubrcom's servers. The following procedure
can be used to accomplish this task.
-
Connect to the server using SSH client (such as Putty or SecureCRT)
with the username and password for the interactive access to the
server.
-
Change directory to "www/www.someblog.com/docs/mt-templates" using
command "cd www/www.someblog.com/docs/mt-templates"
-
Edit the template you want to change using command
"joe mt-main_index.tmpl".
-
After making the changes, hit Ctrl-X on the keyboard to save changes
and exit the editor.
-
Rebuild the site using the new template by logging into MovableType,
selecting the appropriate blog, selecting "Rebuild" and choosing
"Rebuild all".
|