|
Function Requests
Sugar
|
|
|||
|
|
As we get ready for the big 1.0 release, I'd like to make sure that PHP-Sugar ships a large number of useful functions, enough to cover pretty much all the common stuff people need to do. If there's anything that people think are missing, let me know. Note that well before 1.0 is released I plan on having online docs with all the PHP-Sugar template functions (as well as the API docs) so you can browse the function reference, similar to the PHP reference on php.net. |
||
|
|||
|
|
hm... mea culpa... but... a short reference of all currently functionality would be great. i dont know all functions sugar understand for now ... maybe i know after that what i am missing, on the other hand i dont miss anything for the moment ![]() |
||
|
|||
|
|
There is an early preview of what the function reference might look like available here now: http://php-sugar.net/doc The format will be improved as time permits. ![]() |
||
|
|||
|
|
looks good for me so far. thanks for the "short" reference ![]() oh, one thing would be a nice to have. when i tab and struct my templates for better reading, the output have many empty lines. maybe the parser could strip lines that only contain php-sugar commands. as a workaround i use tidy to format the output, but for debugging this is bad since tidy "repair" my html code ![]() |
||
|
|||
|
|
Yeah, I've thought of that same issue with the blank lines. ![]() I'm not entirely sure it's worth doing anything for, though, since the blank lines don't actually hurt anything in the vast, vast majority of cases. Not sure it's worth the extra effort just to appease our sense of aesthetics in the HTML output that nobody even really sees. ![]() |
||
|
|||
| Hello, can you add an argument to the cycle function, allowing cycling between 0 to argument (i.e <% cycle 4 %> would cycle between 0 to 4). This is good for tables containg multi-row data (individual results being displayed over more than 1 table rows) displayed with rowspans etc. Also, being able to add a third (colour) cycle for better visual differentiation of individual rows in a large set of data is always nice. |
|||
|
|||
|
|
That's quite doable. I'll also add a name parameter so you can have multiple cycles going at one time. Possibly a start parameter too in the event you don't want to start at 0. I might even go hog-wild and add in a values parameter that takes an array of what to cycle with. ![]() |
||