SugarNewsWikiDocsBugsForumFilesSource LoginRegister
HomeForumsSugarFunction Requests
Function Requests
Sugar
Sean Middleditch Feb 13th, 2008 at 4:48pm
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.
Thomas Buhk Feb 14th, 2008 at 7:13am
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
Sean Middleditch Feb 14th, 2008 at 5:10pm
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.
Thomas Buhk Feb 19th, 2008 at 10:21am
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
Sean Middleditch Feb 19th, 2008 at 10:30am
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.
Hayden M. (unreg) Jun 24th, 2008 at 2:16am
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.
Sean Middleditch Jun 25th, 2008 at 10:47am
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.

Reply to Topic
or Login