<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://atk-framework.com/index.php?action=history&amp;feed=atom&amp;title=Grouping_attributes_into_two_columns_%28ATK_6.4%29</id>
	<title>Grouping attributes into two columns (ATK 6.4) - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://atk-framework.com/index.php?action=history&amp;feed=atom&amp;title=Grouping_attributes_into_two_columns_%28ATK_6.4%29"/>
	<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Grouping_attributes_into_two_columns_(ATK_6.4)&amp;action=history"/>
	<updated>2026-08-24T05:02:12Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://atk-framework.com/index.php?title=Grouping_attributes_into_two_columns_(ATK_6.4)&amp;diff=18066&amp;oldid=prev</id>
		<title>Jgarifuna: New page: {{howto|easy|Jorge Garifuna &lt;info at garidigital.com&gt;}}   == Requirements ==  ATK 6.4  == Summary ==  As of the ATK 6.4 official release after Oct 26, 2009, there is a new way to add  attr...</title>
		<link rel="alternate" type="text/html" href="https://atk-framework.com/index.php?title=Grouping_attributes_into_two_columns_(ATK_6.4)&amp;diff=18066&amp;oldid=prev"/>
		<updated>2009-10-27T20:05:46Z</updated>

		<summary type="html">&lt;p&gt;New page: {{howto|easy|Jorge Garifuna &amp;lt;info at garidigital.com&amp;gt;}}   == Requirements ==  ATK 6.4  == Summary ==  As of the ATK 6.4 official release after Oct 26, 2009, there is a new way to add  attr...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{howto|easy|Jorge Garifuna &amp;lt;info at garidigital.com&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
&lt;br /&gt;
ATK 6.4&lt;br /&gt;
&lt;br /&gt;
== Summary ==&lt;br /&gt;
&lt;br /&gt;
As of the ATK 6.4 official release after Oct 26, 2009, there is a new way to add  attributes into two columns. This howto walks you through the process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Procedures ==&lt;br /&gt;
&lt;br /&gt;
By default attributes are position on one single column in ATK. To position attributes on the right column you will need to call the following new method within your node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
    $attribute-&amp;gt;setColumn(1)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This method will position the given attribute to the right column of the node, to make a two column layout.&lt;br /&gt;
&lt;br /&gt;
Assuming you had the following node:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        function employee()&lt;br /&gt;
        {&lt;br /&gt;
            $this-&amp;gt;atkNode(&amp;quot;employee&amp;quot;, NF_ADD_LINK);//&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;add(new atkAttribute(&amp;quot;id&amp;quot;, AF_AUTOKEY));&lt;br /&gt;
            $this-&amp;gt;add(new atkAttribute(&amp;quot;name&amp;quot;, AF_OBLIGATORY|AF_UNIQUE|AF_SEARCHABLE));&lt;br /&gt;
            $this-&amp;gt;add(new atkManyToOneRelation(&amp;quot;department_id&amp;quot;,&amp;quot;lesson3.department&amp;quot;, AF_SEARCHABLE));&lt;br /&gt;
            $this-&amp;gt;add(new atkManyToOneRelation(&amp;quot;manager_id&amp;quot;,&amp;quot;lesson3.employee&amp;quot;, AF_SEARCHABLE|AF_RELATION_AUTOCOMPLETE));&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;add(new atkDateAttribute(&amp;quot;hiredate&amp;quot;));&lt;br /&gt;
            $this-&amp;gt;add(new atkNumberAttribute(&amp;quot;salary&amp;quot;, AF_TOTAL));&lt;br /&gt;
            $this-&amp;gt;add(new atkTextAttribute(&amp;quot;notes&amp;quot;, 0, AF_HIDE_LIST));&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;setOrder(&amp;quot;name&amp;quot;);&lt;br /&gt;
            $this-&amp;gt;setIndex(&amp;quot;name&amp;quot;);&lt;br /&gt;
            $this-&amp;gt;setTable(&amp;quot;lesson3_employee&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To display the attributes, name, salary and hiredate on the right column, you would need to modify your node to include the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;add(new atkDateAttribute(&amp;quot;hiredate&amp;quot;))-&amp;gt;setColumn(1);&lt;br /&gt;
            $this-&amp;gt;add(new atkNumberAttribute(&amp;quot;salary&amp;quot;, AF_TOTAL))-&amp;gt;setColumn(1);&lt;br /&gt;
            $this-&amp;gt;add(new atkTextAttribute(&amp;quot;notes&amp;quot;, 0, AF_HIDE_LIST))-&amp;gt;setColumn(1);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So your final code would look as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
        function employee()&lt;br /&gt;
        {&lt;br /&gt;
            $this-&amp;gt;atkNode(&amp;quot;employee&amp;quot;, NF_ADD_LINK);//&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;add(new atkAttribute(&amp;quot;id&amp;quot;, AF_AUTOKEY));&lt;br /&gt;
            $this-&amp;gt;add(new atkAttribute(&amp;quot;name&amp;quot;, AF_OBLIGATORY|AF_UNIQUE|AF_SEARCHABLE));&lt;br /&gt;
            $this-&amp;gt;add(new atkManyToOneRelation(&amp;quot;department_id&amp;quot;,&amp;quot;lesson3.department&amp;quot;, AF_SEARCHABLE));&lt;br /&gt;
            $this-&amp;gt;add(new atkManyToOneRelation(&amp;quot;manager_id&amp;quot;,&amp;quot;lesson3.employee&amp;quot;, AF_SEARCHABLE|AF_RELATION_AUTOCOMPLETE));&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;add(new atkDateAttribute(&amp;quot;hiredate&amp;quot;))-&amp;gt;setColumn(1);&lt;br /&gt;
            $this-&amp;gt;add(new atkNumberAttribute(&amp;quot;salary&amp;quot;, AF_TOTAL))-&amp;gt;setColumn(1);&lt;br /&gt;
            $this-&amp;gt;add(new atkTextAttribute(&amp;quot;notes&amp;quot;, 0, AF_HIDE_LIST))-&amp;gt;setColumn(1);&lt;br /&gt;
&lt;br /&gt;
            $this-&amp;gt;setOrder(&amp;quot;name&amp;quot;);&lt;br /&gt;
            $this-&amp;gt;setIndex(&amp;quot;name&amp;quot;);&lt;br /&gt;
            $this-&amp;gt;setTable(&amp;quot;lesson3_employee&amp;quot;);&lt;br /&gt;
        }&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Until next time,&lt;br /&gt;
&lt;br /&gt;
[Jorge Garifuna http://www.GariDigital.com]&lt;/div&gt;</summary>
		<author><name>Jgarifuna</name></author>
	</entry>
</feed>