[Radiant] how offer a list of PDF files?
Ryan Heneise
lists at artofmission.com
Fri Oct 5 10:24:58 CDT 2007
I'm also doing something similar with PageAttachments. I highly
recommend it.
- Ryan
On Oct 5, 2007, at 7:53 AM, Andrew O'Brien wrote:
> Have you looked at PageAttachments? It gives you the ability to
> upload files through the page editor interface and then reference each
> one using Radius tags.
>
> http://wiki.radiantcms.org/Installing_Extension_-_Page_Attachments
> http://svn.seancribbs.com/svn/rails/plugins/extensions/
> page_attachments/
>
> -Andrew
>
> On 10/5/07, Aitor Garay-Romero <me at aitor.name> wrote:
>> With the backdoor extension (http://backdoor.rubyforge.org/)
>> you can do
>> something in the line of:
>>
>> <r:erb>
>> <% Dir.glob( "newsletters/*.pdf") do |file|
>> if file =~ /.../
>> %>
>> <a href="<%= file%> ... </a>
>> <% end %>
>> </r:erb>
>>
>> /AITOR
>>
>> On 10/5/07, Mark D. Anderson <mda at discerning.com> wrote:
>>>
>>> I want to expose an archive of PDFs of monthly newsletters.
>>> I don't want to create a "Page" entity for each file.
>>> I'd instead like some way to iterate through the file system via
>>> some
>>> glob, something like
>>>
>>> <r:findfile glob="newsletters/*.pdf">
>>> <a href="<r:url/>"><r:url/></a>
>>> </r:findfile>
>>>
>>> Where a relative path in the glob is relative to "public".
>>>
>>> Actually, what I really want is also the ability to extract
>>> information
>>> from the filenames, which are typically like
>>> "newsletter-2007-04.pdf".
>>> So then it might hypothetically be:
>>>
>>> <r:findfile glob="newsletters/*.pdf">
>>> <r:matches string="<r:url/>" expr="/newsletter-(\d+)-(\d+)/"/>
>>> <a href="<r:url/>"><r:match value="$1"/> <r:month-name
>>> month="$2"/></a>
>>> </r:findfile>
>>>
>>> The above is rather ugly, but anyhow, I can't seem to find any
>>> way to do
>>> the above.
>>>
>>> I'm debating whether I shouldn't write a perl program to generate
>>> an RSS
>>> file
>>> based on the existing pdfs, put that in a cron job, and then have
>>> Radiant
>>> process
>>> that external RSS file using the "externalrss" extension.
>>> Except I can't figure out yet how to get any extensions
>>> installed....
>>>
>>> -mda
>>> _______________________________________________
>>> Radiant mailing list
>>> Post: Radiant at lists.radiantcms.org
>>> Search: http://radiantcms.org/mailing-list/search/
>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>>
>> _______________________________________________
>> Radiant mailing list
>> Post: Radiant at lists.radiantcms.org
>> Search: http://radiantcms.org/mailing-list/search/
>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>>
> _______________________________________________
> Radiant mailing list
> Post: Radiant at lists.radiantcms.org
> Search: http://radiantcms.org/mailing-list/search/
> Site: http://lists.radiantcms.org/mailman/listinfo/radiant
>
------------------------------------------------
Ryan Heneise
Art of Mission, Inc.
3720 Gattis School Rd #800 PMB 245
Round Rock, TX 78664
800-722-1492
www.artofmission.com
ryan at artofmission.com
More information about the Radiant
mailing list