My environment is Rails 2.0.2, TYPO 5.1.1. running at RailsPlayground
using the Victor Persson’s Dirtylicious theme
Can someone steer me in the correct direction?  I can upload
files/attachments and see them in the admin “manage uploads” feature.
I can also associate uploads with articles when I edit articles(i.e.
posts).
The problem: I cannot figure out how to make these ‘uploads’ visible as
attachments with the articles(i.e. posts) by simply using the TYPO
administration features.
Do I need to modify the default layout or one of the views?  Any ideas
are greatly appreciated.
             
            
              
              
              
            
            
                
                
              
           
          
            
            
              Tim Prentis wrote:
My environment is Rails 2.0.2, TYPO 5.1.1. running at RailsPlayground
using the Victor Persson’s Dirtylicious theme
Can someone steer me in the correct direction?  I can upload
files/attachments and see them in the admin “manage uploads” feature.
I can also associate uploads with articles when I edit articles(i.e.
posts).
The problem: I cannot figure out how to make these ‘uploads’ visible as
attachments with the articles(i.e. posts) by simply using the TYPO
administration features.
Do I need to modify the default layout or one of the views?  Any ideas
are greatly appreciated.
I think I found a solution.  This is what I inserted into the partial
_article.html.erb under my chosen theme ‘Dirtylicious’
    Posted by <%= author_link(article) %>
    
<%= js_distance_of_time_in_words_to_now article.published_at 
%>
+    
+    <% if Resource.count(:conditions => "article_id = #{article.id}") > 
0 %>
+    Attachments:
+      <% Resource.find(:all, :conditions => "article_id = 
#{article.id}").each do |r| %>
+            <%= link_to r.filename, 
this_blog.base_url + "/files/" + r.filename %>
    <% end %>
  <% end %>
  
 
Anybody have any better ideas?
Tim
             
            
              
              
              
            
            
                
                
              
           
          
            
            
              Le 30 juil. 08 à 20:11, Tim Prentis a écrit :
as
attachments with the articles(i.e. posts) by simply using the TYPO
administration features.
Do I need to modify the default layout or one of the views?  Any ideas
are greatly appreciated.
Hello,
first, sorry for not replying faster, I was in holliday and got
internet access only tonight. Trying to answer the pile of mails
that’s waiting for me.
The way attachments was designed on Typo has always been a mistery to
me, and I didn’t want to break it – yet – because it actually had a
purpose.
– uploading via admin/content/new attaches files to the post, but they
will only be displayed in the rss / atom feed. This is intended to be
used for podcasts.
– uploading via admin/resources/new does not attach files to a post.
To you them, you need to c/p the attachment url and do a link /
object / whatever. Pictures uploaded this way can be found with the
images management button of the FCKEditor.
To display articles from your theme, do in your theme somthing like :
@article.ressources.each |foo| do
link_to foo.filename, “#{this_blog.default_url}/#{foo.filename}”
end
Cheers,
Frédéric
–
Frédéric de Villamil
[email protected]                        tel: +33 (0)6 62 19 1337
http://fredericdevillamil.com             Typo : http://typosphere.org