Re: cvs: smarty /docs/en/designers/language-custom-functions language-function-html-table.xml
Monte Ohrt <[email protected]>
| Newsgroups | gmane.comp.php.cvs.smarty |
|---|---|
| Message-ID | <[email protected]> |
Yeah go ahead and update that. Thanks
Monte
messju mohr wrote:
>On Mon, Sep 20, 2004 at 01:01:51PM -0500, Monte Ohrt wrote:
>
>
>>I thought they were mutually exclusive? "cols" makes the data populate
>>left-to-right, and "rows" makes the data populate top-to-bottom. Both
>>doesn't make sense (???)
>>
>>
>
>your explanation makes sense, but it's not how the current works.
>
>"cols" determines the number of cols
>"rows" determines the number of rows
>
>if you don't supply one of them it's computed accordingly.
>if you supply both, you have control over both rows and cols of the table.
>
>for example: rows=3 cols=4
>if you pass 16 elements to it, only the first twelve are printed.
>if you pass 4 elements to it, you get one filled row and two empty rows.
>
>
>to switch the loop behaviour to loop over rows instead of loop over
>cols, there is the "inner"-attribute. "inner" defaults to "cols" and
>means the inner loop in the table is running over cols. if you set
>"inner" to "row" the inner loop is running over rows. i think that
>would trigger the behaviour you expected by supplying a
>"rows"-attribute.
>
>cols=2 rows=2 inner=cols
>
>1|2
>3|4
>
>cols=2 rows=2 inner=rows
>
>1|3
>2|4
>
>
>unfortunately "inner" seems to be broken in the current
>{html_table}. it's missing in the case-loop that fills the parameters,
>so you cannot set it. i just committed a fix.
>
>also "inner" seems to be missing in the docs at
>http://smarty.php.net/manual/en/language.function.html.table.php
>although it's mentionend in the examples in the header for
>function.html_table.php
>
>if there are no objections against this implementation (which was done
>quite some time ago, just not entirely bug-free), i can update
>/docs/en/designers/language-custom-functions/language-function-html-table.xml
>accordingly
>
>greetings
>messju
>
>
>
>>messju mohr wrote:
>>
>>
>>
>>>On Sun, Sep 19, 2004 at 10:20:42PM +0300, George Miroshnikov wrote:
>>>
>>>
>>>
>>>
>>>>Hello Monte,
>>>>
>>>>Saturday, September 18, 2004, 12:35:25 AM, you wrote:
>>>>MO> + <row>
>>>>MO> + <entry>rows</entry>
>>>>MO> + <entry>integer</entry>
>>>>MO> + <entry>No</entry>
>>>>MO> + <entry><emphasis>empty</emphasis></entry>
>>>>MO> + <entry>number of rows in the table, data
>>>>populates
>>>>MO> + cells top-to-bottom, left-to-right. This is
>>>>mutually
>>>>MO> + exclusive with "rows" attribute.</entry>
>>>>MO> </row>
>>>>
>>>>I can't get to the point of last sentence.
>>>>Maybe there should be "cols" instead of "rows"?
>>>>Or is my English _that_ bad? :)
>>>>
>>>>
>>>>
>>>>
>>>I'm no native speaker either, but i think this was supposed to read
>>>"cols", too.
>>>
>>>But: rows and cols are not really mutually exclusive. you can specify
>>>either one and the other is filled, accordingly. but you can also
>>>specify both, then the html-table is spawned across the given amount
>>>of rows and cols.
>>>
>>>greetings
>>>messju
>>>
>>>
>>>
>>>
>>>
>
>
>!DSPAM:415083c0233618259420189!
>
>
>
>
>
>
--
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php