Mailing List Archive

Output to multiple formats
Dear all,

I am attempting to publish a story in multiple formats - a full story, and extract of the story. My
reading of the documents implies that I need to use multiple output channels going to the same
destination. I have created multiple output channels, both of type HTML::Template, with different
values for 'File Name'. One is set to 'extract', the other is set to 'index'. Both are set with the
same URI format, so I think I should be expecting /%{categories}/%Y/%m/%d/%{slug}/index.html, and
extract.html in the same folder. My story element is 'Post', and I have two post.tmpl and post.pl
templates, one associated with each of the two output channels.

What I actually get is /%{categories}/%Y/%m/%d/%{slug}/{slug}.html, and nothing else. This file is
from whichever of the two output channels is set as primary on the story. Even when there is only
one output channel, I still get {slug}.html instead of the name I set in 'File Name'.

Why is the File Name value being ignored? Can I not see the two targets because they are both being
written with the same name?

Thanks for the help.

Ian
Re: Output to multiple formats [ In reply to ]
On Jun 10, 2011, at 9:36 AM, Ian Gibbs wrote:

> Why is the File Name value being ignored? Can I not see the two targets because they are both being written with the same name?

You will need to enable the `STORY_URI_WITH_FILENAME` `bricolage.conf` directive.

But I tend to recommend instead, unless you have an existing file naming convention to replicate, that you just use a different suffix for each Output Channel. That way, the URI ends directory name, and everything in that directory is the same story. You have one URI for all representations of a story.

Best,

David
Re: Output to multiple formats [ In reply to ]
On 06/10/2011 10:59 PM, David E. Wheeler wrote:
> On Jun 10, 2011, at 9:36 AM, Ian Gibbs wrote:
>
>> Why is the File Name value being ignored? Can I not see the two targets because they are both being written with the same name?
>
> You will need to enable the `STORY_URI_WITH_FILENAME` `bricolage.conf` directive.
>
> But I tend to recommend instead, unless you have an existing file naming convention to replicate, that you just use a different suffix for each Output Channel. That way, the URI ends directory name, and everything in that directory is the same story. You have one URI for all representations of a story.
>
> Best,
>
> David
>

Thanks, David, That worked.