How to include images in "pages"

0 views
Skip to first unread message

ramonrails

unread,
Nov 5, 2009, 1:37:05 PM11/5/09
to adva-cms
I preferred adva to drupal for the love of rails and ruby. I am new to
adva.
Can someone tell me how to upload images to be included in "pages"
like any other cms system?

ramonrails

unread,
Nov 6, 2009, 3:08:34 AM11/6/09
to adva-cms
I figured this out already.

first, load the adva_assets plugin, then upload the asset you want to
display

in the view...
<%= asset_image('asset_title') %>

in the application helper (or any other helper that you are loading)
# return asset image tag by searching the asset title
#
def asset_image(asset_title, site = @site, options = {})
begin
(asset = site.assets.find_by_title(asset_title)).image? ?
image_tag( asset.base_url, options) : "<span class='error'>#
{asset_title}: not image?</span>"
rescue
"<span class='error'>Error: asset=#{asset_title} site=#
{site.name} options=#{options.to_yaml}</span>"
end
end

Torsten Becker

unread,
Nov 6, 2009, 3:09:42 AM11/6/09
to adva...@googlegroups.com
Hi,

As content in an article:
Upload the picture as an asset. You can then add it from your asset
tray with the naming with the image-Tag.

As part of a theme
Upload the image in the theme editor. Add it in the template with the
imagelink description as decribed in the adva-cms.org wiki.

Hope this helps

Torsten
> --
>
> You received this message because you are subscribed to the Google
> Groups "adva-cms" group.
> To post to this group, send email to adva...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/adva-cms?hl=en
> .
>
>



Reply all
Reply to author
Forward
0 new messages