|
From: | Finn Bacall |
Subject: | [myexperiment-hackers] virtual_hosts |
Date: | Wed, 19 Oct 2011 13:40:11 +0100 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110921 Thunderbird/3.1.15 |
Hi guys,I'm planning on changing how myexperiment chooses what page layout to use. At the moment, this is decided before a request is passed through to a controller action (by looking at the request URL, referrer, etc.).
For e-LICO, I'm adding in an option (a small checkbox) that will be displayed in the "sharing" section of the workflow creation/update form, that allows a user to indicate that they want their workflow to be rendered in a custom layout (like how the e-LICO group page looks at the moment).
The issue with doing this in the current system, is that I need to access to the workflow object to check which layout the user has specified to use, and this isn't fetched until the controller action is processed. My solution is to create a helper method to choose which layout to display, which is called by the view. This ensures the controller action has already run and I have access to the workflow object.
Before I do this it would be good to hear any criticisms/suggestions. I'd also like to know if there are other "virtual hosts" in-use other than e-LICO, as I was considering moving settings purely to do with the layout/stylesheet into a different section in the "settings" YAML file.
Cheers, -Finn -- Finn Bacall School of Computer Science University of Manchester
[Prev in Thread] | Current Thread | [Next in Thread] |