Quote from: samba at May 04, 2011, 03:40 PM
Hi,
I don’t know if you can share resources across contexts, let’s see what others say. But you can certainly share CSS across contexts if it’s in the file system, as opposed to being a resource in the database. This way I don’t have to have so much CSS code around.
You can have it both ways, too... I like to have some shared CSS across contexts, but have some overrides for each context, even if they share the same template. Sort of like the concept of child themes in Wordpress. Very centralized, and less code to write.
Hi Samba, thanks for the answer.
Actually I am going to use some meta-language for CSS (e.g., SASS, LESS or whatever), so I would like to have them as resources (automatically parsed by the SASS or LESS converter). Moreover, in this way I have only one access point to edit the website content (being them templates, CSS, convent, whatever).
Of course the problem remains with "hidden-context" resources (e.g., AJAX responders). Is there any tutorial for the contexts, in particular for what happend with the presentation layer (rather than the manager)? I can only see two examples in the documentation, but it’s not clear, for me, why I should "switch" a context in order to see other context’s resources.