Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-28 20:30:44

mickinsight
New Member
Registered: 2006-01-28
Posts: 2

Some changes to use txp as a cms

While on search for a little but powerfull cms i found textpattern and use it. Based on last revision (4.03) i added 4 features. Perhaps it’s useful for others.
If so, i’ll send the changed sources (publish.php and taghandlers.php) or a diff-file by request.

I) New attribute “target” for <i>linklist </i>

I don’t like loosing my visitors when they click at an external link of my linklist. Therefore i created a new attribute for the tag <i>linklist</i> target.
If not empty, the links will be openend in the targeted frame.

Example:
>txp:linklist wraptag=“p” target=”_blank”/>

II) New attribute “group” for <i>category_list</i>

I build the menu of my website with categories. Each submenu is connected via the parent-attribute with the dependent mainmenu.
Using the parent attribute when building the categorylist shows also the mainmenu. To prevent from this behaviour there is the group attribute.
If set all categories are listed exclude the parent-category.

Example:
>txp:category_list wraptag=“td” break=”&nbsp;” group=”__layer1”/>

III) Special keyphrase for categories</i>

I need to cover special categories when using <i>popup©</i>. Normally every category will be shown. To prevent this the simplest way was to embed a special phrase.
If a category is started with two underscores (_) it’s handled hidden.

IV) Special keyword for <i>article</i> and <i>article_custom</i>

In fact textpattern has no sessionmanagement it was hard to handle the following job:
To make the menustructure really dynamic, i use the hierarchy of categories to build menutrees. Each submenu is a category with a certain amount of articles. These titles of these articles will be listed as a “submenulist”. But it’s dynamic and the attribute category of <i>article_custom</i> is static.
While choosing a category (click an mainmenu) there’s no problem, cause the articlelist is filtered by the category-param as part of the http-request (“c”).
In case the user clicks an article (“id”) every article will be listed in the articlelist. To prevent of this “feature” i invite the keyword “__category” as argument for “category”.
If set the category of the article with given id will be used to gen the articlelist.

Example:
>txp:article_custom section=“sek_main” form=“artikeltitel” sortby=“custom_1” sortdir=“desc” category=”__category” limit=“5” />

Offline

#2 2006-01-29 00:36:59

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: Some changes to use txp as a cms

<blockquote>I don’t like loosing my visitors when they click at an external link of my linklist. Therefore i created a new attribute for the tag linklist target.
If not empty, the links will be openend in the targeted frame.

Example:
txp:linklist wraptag=”p” target=”_blank” </blockquote>

How does this get rendered in the resulting XHTML? If as a target attribute in an anchor it won’t validate in XHTML as target is deprecated.

Last edited by NyteOwl (2006-01-29 00:38:38)


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#3 2006-01-29 02:49:37

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Some changes to use txp as a cms

Forcing (or trying to force) a link to open in a new window is a very good way to loose visitors, I agree.

Last edited by Jeremie (2006-01-29 02:49:50)

Offline

#4 2006-02-01 14:43:31

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: Some changes to use txp as a cms

mickinsight, can we see this in action somewhere please?

Offline

Board footer

Powered by FluxBB