Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/deb7131n5/domains/maxvoltar.com/public_html/2009/textpattern/lib/txplib_db.php on line 14

Deprecated: Function split() is deprecated in /home/deb7131n5/domains/maxvoltar.com/public_html/2009/textpattern/lib/txplib_misc.php(570) : eval()'d code on line 471
Maxvoltar - Maxvoltar.com: Textpattern integration

Maxvoltar is the personal weblog of Tim Van Damme, a freelance interface designer at Made by Elephant.

50° 54' 47" N, 4° 25' 50" E


Maxvoltar.com: Textpattern integration

As you can read in the footer, this site is powered by Textpattern. In this article, I’ll give you a look underneath the hood: Used plugins, pages & forms.

Plugins

If there’s one thing I love about TXP (besides the fact that it uses tags I can actually understand), it’s the large community of users and the people who write plugins.

At this time, I’m using following plugins:

The edit link

It’s the first time I used rss_article_edit, and I cannot imagine living without it. It provides a direct link to edit the entry you’re currently reading. This link is only visible when you have a certain cookie set.

Pages

I only have 1 page1, and here’s the code of it:

<txp:output_form form="_header" />
<txp:output_form form="_navigation" />
<txp:article />
<txp:output_form form="_paging" />
<txp:article_custom section="about" ↩
    form="_about" status="sticky" />
<txp:output_form form="_footer" />

That’s it. That’s the page that keeps this site running. I could simplify this by putting the output forms “_header”2 and “_navigation” into one form, but will leave it this way for the sake of readability.

Forms

“default”

Because all the 5 types of entries look different, the only task my default form has is to import other forms depending on the section of the entry.

<txp:if_different>
    <h3>
        <span>
            <txp:posted format="%B %d, %Y" />
        </span>
    </h3>
</txp:if_different>
<txp:if_article_section name="quotes">
    <txp:output_form form="_quote" />
</txp:if_article_section>
<txp:if_article_section name="links">
    <txp:output_form form="_link" />
</txp:if_article_section>
[…]

<txp:if_different> makes sure the date is being displayed only once (this “groups” all the entries together).

“_note”

Here’s how “_note” looks like. I chose this form because it’s the most simple one. The others follow the same principles.

<div class="note">
    <h4>
        <txp:title />
    </h4>
    <div class="excerpt">
        <txp:body />
    </div><!-- excerpt -->
    <p class="category">
        <txp:section name="notes" title="1" ↩
            link="1" />
    </p>
    <p class="posted">
        <txp:permlink title="Permanent link ↩
            to this entry">
            <txp:posted />
        </txp:permlink>
    </p>
    <p class="edit">
        <txp:rss_article_edit>
            Edit
        </txp:rss_article_edit>
    </p>
</div><!-- note -->

So…

I hope you enjoyed this article, and maybe even learned a couple of things. Remember that this is how I use Textpattern. Like CSS, there are multiple ways of solving one problem.

Next time I’ll write about the design decisions I made.

1 Well, that’s a lie. I’ll need to add 2 more pages so I can have a custom RSS-feed. More on that in another article.

2 I always start the name of my forms with an underscore to differentiate them from the default forms in Textpattern.

1Comments

Commenting is closed for this article.


Home

Powered by Fusion