diff options
| author | hukl <contact@smyck.org> | 2009-09-01 11:49:56 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-01 11:49:56 +0200 |
| commit | 4aa4a0e4a44735d22ac7f8fd1b12b19699af087b (patch) | |
| tree | 34c78c00617a504c7d713540fb349fd9af1d0e23 /app/helpers | |
| parent | c95126d6b6abd6302a07fbb17cd9ad0181e048c7 (diff) | |
added expirimental routing for image galeries
added plain image gallery template
refinements
Diffstat (limited to 'app/helpers')
| -rw-r--r-- | app/helpers/content_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/content_helper.rb b/app/helpers/content_helper.rb index 6309c8b..8b16462 100644 --- a/app/helpers/content_helper.rb +++ b/app/helpers/content_helper.rb | |||
| @@ -16,6 +16,16 @@ module ContentHelper | |||
| 16 | ) | 16 | ) |
| 17 | end | 17 | end |
| 18 | 18 | ||
| 19 | def headline_image | ||
| 20 | image = @page.assets.images.first | ||
| 21 | if image | ||
| 22 | link_to_path( | ||
| 23 | image_tag(image.upload.url(:headline)), | ||
| 24 | ("galleries/" + @page.node.unique_name) | ||
| 25 | ) | ||
| 26 | end | ||
| 27 | end | ||
| 28 | |||
| 19 | 29 | ||
| 20 | # Returns the published_at attribute of a page if it is not nil, otherwise | 30 | # Returns the published_at attribute of a page if it is not nil, otherwise |
| 21 | # it returns the auto-filled value of the created_at attribute | 31 | # it returns the auto-filled value of the created_at attribute |
