• Mr.Muliebris

Welcome to the updated site

Updated: Dec 2, 2020

Today marks the long-overdue release of a fresh update of the www.mrmuliebris.com website. Along with new images and galleries, it has been restructured under the covers to use a database, as trailed in this earlier blog. The new look Galleries page offers more information about the galleries on offer and now offers a search feature.

To reduce the number of pages, the site has been converted to use a database. I've written this blog to summarize how it was done for those of you who use Wix and might want to do something similar.

Just a quick note about terminology. Wix lets you build what it calls dynamic pages. Dynamic pages are essentially templates that can be connected to a database you create.

Previously the site had nearly 60 static pages, most of which were collections of images, one per collection. Now there are just nine pages on the site. Two of these are dynamic. Those two dynamic pages replace 50 static, hard-coded pages.

The basic structure of the site is simple. My galleries are themed collections of images. Galleries might be collections themed by a set with one model, such as the new Behind the scenes gallery; more whimsically, such as Art is a lie (Photoshop manipulations); or show uncensored social media posts. Galleries and images are stored in two database tables. There are over 50 gallery records and 884 image records at the time of writing.

Wix has a relatively easy to use interface for creating and maintaining the data. That said, data entry was the most time-consuming part of the conversion job. I tried to automate it. Wix says Excel .csv files can be used to import data. However, the data is in Lightroom, and in its wisdom, Adobe has not seen fit to provide a way to output metadata in tabular form. None of the third-party tools available quite did what I wanted. That meant I had to populate the tables manually using copy and paste. I got occasional timeouts updating tables but it wasn't a big deal. Given my day job and domestic obligations, I managed one collection of images a day - which took 50 days, at about 10 to 30 minutes a go! It was a tedious job. I made it even more boring by deciding to add alt-text to the images to improve the site's SEO. Here's hoping, anyway.

By default, Wix assumes an index -> item relationship when creating dynamic pages. A musician might create many albums, for example. Providing you establish a link using a key in the data structure, Wix creates a template index page that links to a template item page. Wix calls the index 'Galleries(All)'. Wix calls the item page template 'Galleries (Title)'.

However, Wix doesn't currently provide a drag and drop template means of populating an item Galleries(Title) page with an embedded set of images -- or, at least, not in the way I wanted it to look. It's a third level of embedded structure, as it were. This is equivalent to not allowing an automatic way of showing all the songs on an album that a musician creates.

This is where Wix's terminology can get confusing, by the way. In the basic template environment, Wix provides multiple options for displaying sets of images on a static page. But it calls them… "Galleries". Technically, it means Image Galleries.

I happen to like the grid version best, but none of the Image Galleries worked properly on a dynamic item page straight out of the box. I wanted the user to be able to expand each image to see the accompanying text and credits. However, all 884 images showed in the Image Gallery on each Galleries(Title) page, irrespective of the gallery.

I needed to be able to tell the Grid Pro Gallery embedded on the page to only show the images relevant to the collection gallery.

To get this working, I had to get to grips with the Corvid by Wix extension. Basic Wix is a template site builder for people who don't want to code. Corvid by Wix allows a novice like me to program extra functions into the template site using Javascript. Javascript is a programming language that allows you to code features on web pages. I last programmed about thirty years ago, so it took a little getting used to, but there is plenty of support available online. I found Wix's support good too, although there were some frustrating things Corvid by Wix and Wix can't do easily, such as link from an image in one gallery to another. I think I'd have to build an image display function myself, which is beyond me right now.

To get just the correct images for one of my individual galleries to show on Galleries(Title) page, I found this video by Alex. I created the Image database schema with a single key, a code for the gallery title. The Corvid by Wix Javascript code loops through the Image table to filter images with the right key. The page code also hides or shows a blog button and lets the user go back to the index. The code looks like this:

Because the galleries and images are stored in a database, the site can now support search, filter and sorting features.

The code is adapted it from this video by Wix and supporting forum entry.

Was it worth it? Well, I had no choice as the site will otherwise likely exceed the 100 page limit Wix imposes on static pages. It has been a lot of work. While frustrating at times, I found it fun, but I'm weird like that. The advantage is the site now is easier to maintain than it used to be. Putting a new gallery up is considerably easier and less prone to human error - it's just data entry.

Contact me if you want to know more.

Recent Posts

See All

Copyright © 2019 - 2021 by Mr.Muliebris. All rights reserved.