Linklets utilize The Template
Toolkit located at http://www.template-toolkit.org.
At this time, Linklets are primarily for outputting
"link" content. There is currently no support
for Linklets to generate a main category page, automatic
pagination, or support pages, such add_link.html or
modify.html. Linklets also can not currently be used to
control Search Results formatting.
The future direction of Linklets will largely be determined by
LinksManager.com users. As specific Linklet
functionality needs arise, the LinksManager.com team will
extend the underlying Template Toolkit to include the
requested functions. As more Linklet solutions are
deployed, a Linklet Library will become available.
Complete documentation for The Template Toolkit is available:
http://www.template-toolkit.org/docs/manual/index.html
The Linklet Editor is very basic, and you may choose
to utilize your favorite text editor (i.e. Notepad, UltraEdit,
PSPad) to create Linklets and copy and paste the results into
the Linklet Editor.
The fields "Linklet Filename" and "Linklet
Extension" specify the name of the file where the Linklet
output will be written to. Linklets are currently
automatically regenerated everytime the "Save
Linklet" button is pressed. A list of
"Published Linklets" (outputs) will display at the
bottom of the Linklet Editor window. If FTP is
enabled on your LinksManager.com account, published linklets
will automatically be uploaded on the next FTP upload.
This is a Linklet in it's simplest form:
[%
FOREACH link = linklist('category:14', 'id').reverse %]
<a href="[% link.url %]" style="font: 10pt
Arial">
[% link.sitename %]
</a>
<br>
<font style="font: 8pt Arial">
[% link.description %]
</font>
<br><br>
[% END %]
The
first line -- [% FOREACH ...
%] -- is the start of a Template Toolkit control structure.
The 'linklist'
statement is a LinksManager.com extension to The Template
Toolkit that returns a List
Reference. The contents of the list are
determined by the first parameter, in this example
'category:14'. This parameter has valid values of:
| category:# |
Specifiy Category |
| categories:#,#,#,... |
Multiple Categories |
| id:# |
Specific Link ID |
| ids:#,#,#,... |
Multiple Link IDs |
The
second parameter to the 'linklist' statement determines what
field the list will be sorted by, currently either: 'id' or 'sitename'
Each item returned by the 'linklist'
statement is a Hash
Array Reference. Currently each item has the
following members:
.id -- the LinksManager.com
link ID #
.sitename -- the LinksManager.com "Site
Name" field
.description -- the LinksManager.com "Site
Description" field
.url -- the LinksManager.com "Site URL" field
.reciprocating -- 1 = YES reciprocating, 0 = all other
conditions (250, BLOCKED, etc)
.categories -- a List Reference to the list of categories
this link belongs to
[%
FOREACH cat = link.categories %]
[% cat.id %] - [% cat.name %]
[% END %]
The '.reverse' after the 'linklist' statement is a
Template Toolkit List
Virtual Method. This causes the order of the list to
be returned. In the example, the returned linklist is sorted by 'id'
-- lowest to highest (oldest first, newest last). The '.reverse' changes this order
to highest to lowest (newest first, oldest last).
This FOREACH statement
itterates through every link in category #14 of your
LinksManager.com account, displaying the link sitename in 10
pt Arial, followed by the link description in 8 point
Arial.
The last line -- [% END
%] -- is the end of the [% FOREACH
... %] statement.
If you have additional questions regarding the
Linklets product, please contact us.
Current users: please login then click Request Support from
your account menu for Helpdesk Support.