From 4aa4a0e4a44735d22ac7f8fd1b12b19699af087b Mon Sep 17 00:00:00 2001 From: hukl Date: Tue, 1 Sep 2009 11:49:56 +0200 Subject: added expirimental routing for image galeries added plain image gallery template refinements --- app/helpers/content_helper.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 6309c8bd..8b164623 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb @@ -16,6 +16,16 @@ module ContentHelper ) end + def headline_image + image = @page.assets.images.first + if image + link_to_path( + image_tag(image.upload.url(:headline)), + ("galleries/" + @page.node.unique_name) + ) + end + end + # Returns the published_at attribute of a page if it is not nil, otherwise # it returns the auto-filled value of the created_at attribute -- cgit v1.3