Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel
Re: enhanced keywords in bricolage
 

Index | Next | Previous | View Flat


dawn at dawnthots

Apr 20, 2011, 7:55 PM


Views: 1488
Permalink
Re: enhanced keywords in bricolage [In reply to]

thanks David

Dawn

On 2011-04-20, at 10:49 PM, David E. Wheeler wrote:

> On Apr 20, 2011, at 7:13 PM, Dawn Buie wrote:
>
>> Yes you said that today on IRC. Greg and I looked at keyword groups in the API and a solution didn't leap out at us.
>>
>> http://www.bricolagecms.org/docs/devel/api/Bric/Util/Grp/Keyword.html
>> http://www.bricolagecms.org/docs/devel/api/Bric/Util/Grp.html
>>
>> So would we make a parent group for the keyword group? Could you have groups of keywords that have groups of child keywords?
>>
>> my $parent_id = $grp->get_parent_id;
>> $grp = $grp->set_parent_id($parent_id);
>
> I was going to say “no,” but now I'll say “maybe.” I’m not sure the parent_id stuff is actually used. I think it was included in the original design of the API and never used. Might work. I don’t know.
>
>> Or what is a member collection? It's a private method. Should we use that?
>
> A collection is just an abstract way of grouping things together. So yes, maybe you’d want to create a collection subclass instead of a group subclass. In fact, I’d say that’s probably the way to go (I forgot all about collections).
>
>> my $memb_coll = $get_memb_coll->($self)
>> Returns the collection of members for this group. The collection is a Bric::Util::Coll::Member object. See that class and its parent, Bric::Util::Coll, for interface details.
>
> Yeah, but you can use collections directly in the Asset class and ignore groups, I think. I’d have to look at the API again to see how it works, but I believe there are other parts of the API that use collections…Ah, yes, Contacts are managed as collections. IIRC, there is a collection object for contacts associated with the Person class. No Grp required.
>
>> Or woud you uses classes of the keyword groups?
>>
>> my $class_id = Bric::Util::Grp::Keyword->get_class_id;
>> Returns the Bric::Util::Class object ID representing this class.
>
> That’s what I was saying initially, but now I think using a collection subclass (for which you’d have to add a table, IIRC), is a better idea.
>
>> I don't dig into the guts of Bricolage normally so I don't know what the first step would be.
>
> Just lots of poking, really. The code is more important to read than the docs, as the docs are written more for templating and less for application design.
>
> Best,
>
> David
>

Subject User Time
enhanced keywords in bricolage dawn at dawnthots Apr 20, 2011, 12:57 PM
    Re: enhanced keywords in bricolage david at kineticode Apr 20, 2011, 4:09 PM
    Re: enhanced keywords in bricolage dawn at dawnthots Apr 20, 2011, 7:13 PM
        Re: enhanced keywords in bricolage david at kineticode Apr 20, 2011, 7:49 PM
    Re: enhanced keywords in bricolage dawn at dawnthots Apr 20, 2011, 7:55 PM
    Re: enhanced keywords in bricolage zdravko.balorda at siix Apr 20, 2011, 10:32 PM
        Re: enhanced keywords in bricolage dawn at dawnthots May 2, 2011, 12:21 PM
    Re: enhanced keywords in bricolage dawn at dawnthots May 2, 2011, 12:42 PM
        Re: enhanced keywords in bricolage david at kineticode May 4, 2011, 11:14 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.