Yeah my current code is in tags, just wasn't sure that fit into the MG philosphy in the true sense. Was pondering converting them to helpers or view fragments, but maybe I will just leave as tags..
On Wed, Oct 14, 2009 at 1:14 PM, Dan Wilson <[email protected]> wrote: > Helpers are really a way to organize User Defined Functions that you may > wish to share across your controllers and or your views. Perhaps you have > some process you want to not sprinkle all throughout your code, well a > helper would be your ticket. > > However, what it sounds like you need is a proper custom tag. Custom Tags > are AWESOME for encapsulating view code or view fragments or view processes > like pagination. Custom tags can have functions inside them too, if that > helps the organization... but don't rule out Custom Tags as a solution. > They are a really awesome, sometimes underused in OO applications, feature > of CF, > > DW > > On Tue, Oct 13, 2009 at 10:07 PM, Brettski <[email protected]> wrote: >> >> Thank you for the reply but it was just an example for large return >> helpers.. it could be ..getXWidget which returns a large amount of >> html.. just wondering if helpers or views are preferred in this case.. >> >> >> >> On Oct 14, 11:49 am, "John C. Bland II" <[email protected]> >> wrote: >> > Peep Nate's Pagination.cfc:http://www.dopefly.com/projects/pagination/. >> > >> > One thing to note, watch your queries. Passing in a full query works but >> > if >> > you have a bunch of records it will HOG (as expected). :-) Just a note >> > from >> > a personal blunder. lol >> > >> > --- >> > John C. Bland >> > IIhttp://www.johncblandii.comhttp://www.johnandseason.comhttp://www.twitter.com/johncblandii >> > --- >> > Suggested sites:http://www.lifthimhigh.com- "Christian Products for >> > Those Bold Enough to >> > Wear Them"http://www.sportsmatchmaker.com- "What are you doing today?" >> > >> > On Tue, Oct 13, 2009 at 7:05 PM, Brettski <[email protected]> wrote: >> > >> > > Hi, >> > >> > > I'm looking to have a helper that returns pagination. Something along >> > > the lines of for examples sake ( i would have more parametersi real >> > > life) >> > >> > > <cfoutput>#helpers.ui.pagination( query, start, count )#</cfoutput> >> > >> > > This would return a chunk of html that would contain next / previous >> > > buttons and maybe some navigational elements. >> > >> > > Should I be using helpers for this kind of thing or would it be more >> > > appropriate to be a view component? Helpers seem like a more >> > > appropriate option given that it will be a reusable component used >> > > across many views? >> > >> > > Is it OK to return large chunks of html via helpers? >> > >> > > Look forward to your thoughts.. >> > >> > > Many thanks, >> > >> > > b >> > > > > -- > “Come to the edge, he said. They said: We are afraid. Come to the edge, he > said. They came. He pushed them and they flew.” > > Guillaume Apollinaire quotes > > > > --~--~---------~--~----~------------~-------~--~----~ Model-Glue Sites: Home Page: http://www.model-glue.com Documentation: http://docs.model-glue.com Bug Tracker: http://bugs.model-glue.com Blog: http://www.model-glue.com/blog You received this message because you are subscribed to the Google Groups "model-glue" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/model-glue?hl=en -~----------~----~----~----~------~----~------~--~---
