Adding an ellipsis mark automatically to the entry data

| No Comments | No TrackBacks

I guess you have wanted to add an ellipsis mark, like "...", in your entry title automatically.

So, how did you do to apply the mark?

Oscar, an author of "WolaWola", wrote some answer to this question. In his journal, he apply the ellipsis mark only using MT tags.

Let's say you want to apply an ellipsis mark, such as "...", in your entry title when it has over 18 characters.

Here is an Oscar's sample code.

<MTEntryTitle count_characters="1" setvar="count_word">
<$MTEntryTitle trim_to="18"$>
<MTIf name="count_word" gt="18">...</MTIf>

In this code, he uses "trim_to" modifier to cut off the entry title to 18 caracters. Also he enter the number of title to the variable named "count_word", and when it has over 18 numbers, an ellipsis mark will be applied automatically by "".

Simple, but useful sample code.

No TrackBacks

TrackBack URL: http://www.mt-j.info/mt/mt-tb.cgi/106

Leave a comment

About this Entry

This page contains a single entry by nick published on May 2, 2010 10:00 PM.

Power CMS for MT, an enterprise CMS sofware based on Movbale Type was the previous entry in this blog.

kotonohalink, adding a link url to arbitrary words is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.