Custom field types and richtext question

Hi,

I am loving how easy it is to install and work with MoreGallery as a designer with basic dev knowledge.

I have a project that has one main image of a dress, that has a description and sometimes additional images from different angles. It’s not e-commerce, so an image with it’s own ‘page’ is ideal.

I have read the docs on how to create a custom field on a gallery image, and this works, however I was wondering what ‘Type’ types are available - ‘image’ does not render… Any ideas or alternatives appreciated as individual resources feels a bit bloated.

Also I have use richtext set to yes in the settings, however this does not appear on the ‘description’. (Using TinyMCE Wrapper by donshakespeare).

Thanks,
Sarah

Hi @givemegimmicks!

It’s a bit hidden, but from the documentation:

type: how the field is shown. This currently supports text (the default), textarea, richtext, and select.

Would it make sense for you to have one gallery resource per dress? You can limit the mgGetImages snippet to retrieve only the first image for the main image, and load the other angles in a nice gallery view or so below.

As for TinyMCE Wrapper, that editor has a bit of a mind of its own and does not play well with other packages that attempt to load RTEs through a more or less standardised way. I’m sure it’s possible to get it to load, but it’ll require custom coding (as TW prefers code over configuration) to get it to initialise at the right spot at the right place.

Hi Mark,

Thanks! It would make sense to have one gallery resource per dress however, it’s a lot of dresses, was just hoping to cheat I guess :wink:

I did think it might be the case… having so much trouble trying to find a text editor I can customise, yet works…

This might come as a surprise, but I’d recommend checking out Redactor. :stuck_out_tongue:

If you have a lot of dresses and don’t want them all in the resource tree, you could use Collections to create a container for the galleries. That’s also nicely configurable so that new resources created in it are automatically the right type of resource, use the right template, etc. Very useful tool.

Well that is a surprise Mark :stuck_out_tongue:

With Redactor, is it possible to use a stylesheet in the rich text display? i.e H2’s appear in the same font/colour as on the website. My clients seem to like this a lot.

I use collections a lot so yes that is what I plan to do :slight_smile:

:grin:

Yeah, there’s a redactor.css setting where you put the path to a CSS file which will then be loaded with redactor. Then you just need your css to target .redactor-editor h1, .redactor-editor h2 etc with the CSS styles you’d like to add.

Hi Mark,

New question: I now have to use tagger for resources, how do I hide/remove the tag box on edit image in the gallery?

Need to remove as my client is bound to get the two confused… :wink:

Hi @givemegimmicks!

You can use the permissions in MoreGallery to do that. Take a look at the documentation for information on how that works, and then use that to give the client all but the moregallery_image_tags permission to hide the entire tags box from them.

Ugh, access policies. I should have known! Thanks for the quick response Mark :slight_smile:

No problem. I’ve added a new FAQ for people wondering the same in the future :slight_smile:

1 Like