Mailing List Archive

[Bricolage-General] Fwd: Bricolage Docs on Covers?
Begin forwarded message:

> From: dbii@mudpuddle.com (David Bluestein II)
> Date: Sun Nov 10, 2002 10:13:13 PM US/Pacific
> To: david@wheeler.net
> Subject: Bricolage Docs on Covers?
>
> David-
>
> Congratulations on the article, glad to see the project got some press
> finally.
>
> I've read through the documentation, and have a handle on stories (and
> on
> how templates tie in). I'm lost though on how to setup a cover as
> mentioned
> in ElementAdmin. I have a Cover, and I can create a Column, but I am
> missing:
>
> a) How to create a column that is static navigation.
>
> b) How to pull that column into a cover.
>
> c) How to create a column that is has dynamic content (the list of
> recent
> stories) so that it is automatically updated whenever published.
>
> The documentation in Templates is mainly for Story, so the leap from
> that
> to a Cover is hard to see. If someone can point me in the right
> direction,
> I'd be happy to document this (if it isn't already) so others can
> follow.
> We're looking forward to providing feedback (esp. on the HTML::Template
> side of things) as we work with Bricolage.
>
> Thanks-
>
> David
>
> ----------
> David H. Bluestein II President & Lead
> Developer
> dbii@mudpuddle.com ii, inc.
>
> http://www.interaction.net
> - Specializing in Designing Interactive Websites -
> - and Searchable Internet Databases -



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general
Re: [Bricolage-General] Fwd: Bricolage Docs on Covers? [ In reply to ]
>> From: dbii@mudpuddle.com (David Bluestein II)
>> Date: Sun Nov 10, 2002 10:13:13 PM US/Pacific
>> To: david@wheeler.net
>> Subject: Bricolage Docs on Covers?
>>
>> David-
>>
>> Congratulations on the article, glad to see the project got some
>> press finally.

Thanks!

>> I've read through the documentation, and have a handle on stories
>> (and on
>> how templates tie in). I'm lost though on how to setup a cover as
>> mentioned
>> in ElementAdmin. I have a Cover, and I can create a Column, but I am
>> missing:
>>
>> a) How to create a column that is static navigation.

Well, there are numerous methods. You an hard-code it into a template,
for example. What I did for Macworld was to put it into a server-side
include that's managed as a media object in Bricolage. That way, the
nav on the entire site can be updated by changing just the one SSI.

>> b) How to pull that column into a cover.

If by column you mean a column on a page (rather than a column type of
story), you can create a "Left Column" (or "Right Column" or whatever)
element in the Element manager, and then add it as a subelement of the
"Cover" story type.

>> c) How to create a column that is has dynamic content (the list of
>> recent
>> stories) so that it is automatically updated whenever published.

In the template for the "Right Column" you just created, you need to
use the Bricolage API to get a list of stories to output, something
like this:

<%once>;
# "Story" story type element ID is 1.
# Substitute the ID of the story type element you use for
# your main stories.
my $story_eid = 1;
</%once>
<ul>
<%perl>;
my $srcid = $story->get_source__id;
foreach my $s (Bric::Biz::Asset::Business::Story->list
({ Limit => $10, # We only need so many.
source__id => $srcid, # Use the same source
publish_status => 1, # Only published stories.
element__id => $story_eid, # Only "Story" stories.
Order => 'cover_date', # Sort by the cover date.
OrderDirection => 'DESC', # Most recent first.
})) {
# Output the Item.
$m->out('<li><a href=">', $s->get_primary_uri, '">',
$s->get_title, "</a></li>\n");
}
</%perl>
</ul>

>> The documentation in Templates is mainly for Story, so the leap from
>> that
>> to a Cover is hard to see. If someone can point me in the right
>> direction,
>> I'd be happy to document this (if it isn't already) so others can
>> follow.
>> We're looking forward to providing feedback (esp. on the
>> HTML::Template
>> side of things) as we work with Bricolage.

Oops, my example was in Mason, but you get the general idea. As for
where to get help, this list is probably your best source.

HTH,

David

--
David Wheeler AIM: dwTheory
david@wheeler.net ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: Theory@jabber.org



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Bricolage-General mailing list
Bricolage-General@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bricolage-general