I am using a folder at the website root level named ‘data’ which contains CSV files. This is being processed by PHP code in an Elements Custom Component (Devpack).
This is easy to test using MAMP Pro as I can publish the site to a local folder which already contains this ‘data’ folder. This folder remains across multiple website publishes. However when testing in Preview, I first have to figure out what the root folder is for preview (which I can do via PHP code) i.e. :
I then use Finder to navigate to the folder and add in the ‘data’ folder containing the CSV files.
This works but is a bit tedious to setup, especially as it appears that Elements deletes this temporary folder when quit (understandable). So this has to be done for every restart of Elements.
It would be helpful if there was a way to specify a folder to be assigned an alias (or contents copied) when the Preview root is setup. This would mean the setup doesn’t have to be done every time.
Hmmm… we’ve given this a bit of thought, and you probably have a couple of options…
1. Reveal in Finder
The easiest way to find the document preview root is to use the Web Server Logs window - We have a button to reveal it. You can then easily copy in the Data folder at the start of your session.
You could add the data folder to your project while testing and set your php script to first look in your default location /data and if it’s not there look in /resources/data/ (as this would be in your local test project).
Tip two, is a good solution which I have just implemented and tested.
The icing on the caked would be if you could flag specific resources not to be published in order not to have to remember to delete the resource.
Thinking about it, this (non-publishing) would also be useful for components within pages (we already have this for pages) . I don’t think this feature is available at the moment?
@dan Yes,exactly and by implication any sub-component of a component marked as don’t publish. I use this with some Foundry 3 Stacks and so having the equivalent in Elements would be great.