I have no idea how many times I have created a list of links, but its quite a few. I've written a couple different functions to make it easier, but none has stood the test of time.
I just put together one that ties into Digitalus models and supports link templates; its a big time saver.
Say for example you are rendering a list of links to threads.
$threadList = $this->linkList($threads, "<a href='/forum/thread/open/id/{id}'>{subject}</a>");
The helper searches the template and populates it with data from the threads.
Thursday, September 3, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment