It's the same thing I thought!  But, on further review, the site has an existing
table that is periodically updated from their CRM system (automated, batch
style).  

Jamie, thank you, I really appreciate the suggestion from earlier today. 
Haven't had a chance to further work on it more today, but will report back to
the list when progress is made.  I assume other people want to be able to pull
in existing database content in one way or another!?   Hope that's not a
stretch and it helps other people out with there extension attempts.   

Thanks again,
Todd

Quoting Jamie Wilkinson <[EMAIL PROTECTED]>:

> On second glance... what do you need from a FAQ that can't be  
> accomplished with page children and a plethora of page parts?
> 
> -jamie
> 
> On Jan 10, 2007, at 10:14 AM, Jamie Wilkinson wrote:
> 
> > Howdy Todd,
> >
> > A combination of cloning the <r:children:each> tag (slightly lower in
> > the same file) and the metamethod you pointed out should work just
> > fine. So it would look more like:
> >
> > <r:faq:each>
> >     <r:answername />
> >     <r:summary />
> > </r:faq:each>
> >
> > -jamie
> >
> > On Jan 10, 2007, at 7:46 AM, Todd McGrath wrote:
> >
> >> Hello again,
> >>
> >> I'm making some progress on extensions and now I'm looking for a
> >> little push in
> >> the right direction.
> >>
> >> I'm working on an extension for displaying data from database for
> >> the FAQ
> >> section of a site using tags (mental branch).
> >>
> >> * Created a FaqExtension and include the tag:
> >>
> >>   def activate
> >>     Page.send :include, FaqTag
> >>   end
> >>
> >> * in lib/faq_tag.rb:
> >> module FaqTag
> >>   include Radiant::Taggable
> >>
> >>   class TagError < StandardError; end
> >>
> >>   tag "faq" do |tag|
> >>     faq = Answerbookpages.find(:all)
> >>     raise TagError.new("Faq cannot be found") unless faq
> >>     tag.locals.faq = faq
> >>     tag.expand
> >>   end
> >>
> >>   tag "faqhello" do |tag|
> >>     "Hello #{tag.attr['name'] || 'mundo'}!"
> >>   end
> >>
> >> end
> >>
> >> * "faqhello" (<r:faqhello/>) works and "faq" tag is retrieving from
> >> db.
> >> (Obviously, I have an Answerbookpages class
> >>
> >> I'm looking for some insight to take it further.
> >>
> >> In my FAQ page, I'd like to use something like the following:
> >>
> >> <r:faq>
> >>   <r:answername />
> >>   <r:summary />
> >> </r:faq>
> >>
> >> where "answername" and "summary" are fields in the answerbookpages
> >> table.
> >>
> >> Not sure where to begin..
> >>
> >> In the StandardTags class, I see:
> >>   #
> >>   # <r:url />
> >>   # <r:title />
> >>   # etc...
> >>   #
> >>   ((Page.column_names.dup << 'url') - ['class_name', 'created_by',
> >> 'updated_by']).each do |method|
> >>     tag(method.to_s) do |tag|
> >>       tag.locals.page.send(method)
> >>     end
> >>
> >> Maybe the answer I'm looking for is something similar to this?
> >>
> >> Any thoughts or suggestions are really appreciated
> >>
> >> Thank you,
> >> Todd
> >>
> >> _______________________________________________
> >> Radiant mailing list
> >> Post:   [email protected]
> >> Search: http://radiantcms.org/mailing-list/search/
> >> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> >
> > _______________________________________________
> > Radiant mailing list
> > Post:   [email protected]
> > Search: http://radiantcms.org/mailing-list/search/
> > Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> 
> _______________________________________________
> Radiant mailing list
> Post:   [email protected]
> Search: http://radiantcms.org/mailing-list/search/
> Site:   http://lists.radiantcms.org/mailman/listinfo/radiant
> 


_______________________________________________
Radiant mailing list
Post:   [email protected]
Search: http://radiantcms.org/mailing-list/search/
Site:   http://lists.radiantcms.org/mailman/listinfo/radiant

Reply via email to