dependency mechanism

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

dependency mechanism

Torsten Curdt
Folks, I have some trouble understanding the dependency mechanism. In
a helper I am doing some content generation

      def cover
        result = ""
        page.cover.each do |cover|
          cover.each do |k,v|
            p = site.engine.load_page( File.join( "_layouts",
"cover.#{k}.html.haml" ) )
            p.cover = cover
            # page.dependencies.add_dependency( p )
            result += p.content
          end
        end if page.cover
        result
      end

and I would like add the layout file as a dependency.

Looking at dependencies.rb I see an output_path is required for the
page - that's a problem.
I also don't quite get the difference between a key_dependency and a dependency.

Anyone that could help me out here?

cheers,
Torsten

---------------------------------------------------------------------
Archives: http://talk-archive.awestruct.org/
To unsubscribe, e-mail: [hidden email]