Pro Gallery Stack Demo

by Stacks4Stacks using RWSkinz Theme

Relative Paths for CSV Files and Directories

*If you have configured ProGallery to use images or video from a CSV spreadsheet file or an image directory, it is important that the CSV file or content is stored on the same domain (e.g. example.com) and you link to the file using relative links. Relative links offer improved security and much faster retrieval of the data. Our published example above is using a CSV file stored on the Stacks4Stacks server, to build the image gallery you see. This current page you are reading now is stored in the /progallery/ directory. Our CSV file is stored over in the /resources/ directory. This is what it looks like in FTP:

stacks4stacks.com/ progallery/index.php resources/imagedata.csv

So in the stack settings we entered ../resources/imagedata.csv as the link to the CSV file. The CSV file can have links to images stored anywhere, including on other domains. It's just the CSV file that has to live on the same domain as the website.

With relative links, a web browser tracks backwards from the location of the present page (e.g. https://stacks4stacks.com/progallery/index.php). You use ../ to determine how many levels the ProGallery page is from the root domain. Then navigate down into the /resources/ directory, where it will find our imagedata.csv file. And sure enough, if you go to https://stacks4stacks.com/resources/imagedata.csv in your web browser address bar, you will reach the same CSV file.

Again, relative paths are very fast and safe. Trying to access CSV files on other domains will often fail and some hosting companies will block it (as a security measure). There are many more explantations and tutorials online about relative links.

In summary, a relative link tells a web browser what the shortest route is to a file, from the current page. You use ../ to navigate out of directories (back to the website root), and then name the directories (e.g. /resources/2016/gallery/ to navigate down into directories. If the CSV file is within the same directory as the page is stored, just enter the filename as the link. For CSV files added as resources to RapidWeaver, no further action is required.*

See the Stacks4Stacks Website and Documentation for Pro Gallery.