Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-07-14 20:37:08

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

[wiki] New example of using <txp:variable />

Started from user request on russian forum – “Is it possible to output articles in a table by 3 cells in a row?”.

The wiki’s example is here and working example is here


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#2 2008-07-15 09:48:35

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: [wiki] New example of using <txp:variable />

Hi the_ghost. Very good tutorial!
But I don’t understand one thing: how do you use the “trigger” variable? What does it store? Where do you put it?
Could you explain it a little more?

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#3 2008-07-15 20:53:26

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [wiki] New example of using <txp:variable />

Ok.

Form is called to “render” article-related for every article which was selected by <txp:article_custom />. The idea is to place every next article near by previous article’s cell. But without “trigger” we don’t know what was the previous cell – first, second or third in a row. So, at first we check if “triiger” is defined. If not – assign “1” – it will build first cell. If value exists – incease it by 1. If value is 3 – assign 1 – we want only three articles.

Clear now? I’m not so good in english :-[


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#4 2008-07-16 08:34:15

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: [wiki] New example of using <txp:variable />

Victor, I well understood the purpose and the construction of your tutorial. So, if I well understand you, “trigger” is a build in the core function. Right?

Last edited by Pat64 (2008-07-16 08:35:38)


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#5 2008-07-16 09:47:03

the_ghost
Plugin Author
From: Minsk, The Republic of Belarus
Registered: 2007-07-26
Posts: 907
Website

Re: [wiki] New example of using <txp:variable />

Khm.. “trigger is just the name of variable, which was created with <txp:variable /> tag. So, partly you are right, because this tag is native txp tag and it will be avaible for all users since 4.0.7 version


Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?

Offline

#6 2008-07-16 10:36:40

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,659
GitHub Twitter

Re: [wiki] New example of using <txp:variable />

Oops. Sorry Victor. You pass the value of “trigger” each time you render your table lines.

Sorry for my stupidity.

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB