Discussions

Ask a Question

is there a way to set up a download zone ?

Hi, I'm trying to set up a download zone in a website, aka a kind of list of files that users can download by clicking on it. I tried to use the `asset_picker` setting type on a section as defined here : https://doc.locomotivecms.com/docs/json-definition#setting-types But I got this message when trying to push it : ```Resource invalid: definition The property '#/blocks/0/settings/0/type' value "asset_picker" did not match one of the following values: text, image_picker, checkbox, select, url, radio, content_type, hint, integer``` How would you achieve that in that case ? Anyway, I think it would be great to update your doc if there is no more `asset_picker` type. Thanks ! Grégoire
ANSWERED

unique / required bug when empty

I have a content_type `people` with an attribute `email` set like this : ``` - email: label: Email type: string required: false hint: Email / contact de la personne localized: false group: Attributs unique: true ``` The issue (which I think is an actual bug) is that, as it is not required, editors sometimes leave it blank, but as it should be unique, it does not work for more than one person. In my opinion, when required is false and unique is true, the uniqueness should only be verified when the attribute is not blank.

What is super_admin?

I noticed that in the Mongo collection 'locomotive_accounts' the user has a 'super_admin' field. But I didn't find any information about it.
ANSWERED

Browser is not updating after filechange

Hi, I am a developer and new to LocomotiveCMS. I installed ruby 2.7.2, wagon 3.0.3 and 'wagon serve' is working. After updating a file : index.liquid I see a message in my terminal: ``` service=listen action=reload resource=pages timestamp=2022-01-22 11:25:09 +0100 ``` So it is recognized that a file has changed. But my browser is not reloading the page. I tried it on MacOS and on a ubuntu system. In both cases auto reloading is not working in the browser. What am I doing wrong? Should i install extra libs or software? Hope someone can help me. Best regards, Martijn Dekker

How to integrate with my existing rails app?

I would want to know how to integrate locomotiveCMS with and existing Rails app. How can I call an existing rails app service wich loads products from db an show in a locomotive page? How can I use my existing models in a locomotive install? Sorry, but I can't find such information in the docs. Thanks in advance!

Comment gérer les espaces insécables dans les paragraphes

J'aimerais arriver à gérer correctement les espaces insécables dans les paragraphes rédigés par les utilisateurs, notamment pour éviter les retours à la ligne avant une ponctuation. Une solution pour cela est d'utiliser   , mais son utilisation dans l'éditeur rich text ne fonctionne pas et affiche littéralement " ". Est-ce que vous voyez un moyen simple de gérer cela ? Via un script javascript ? Via un bouton dans l'éditeur rich text qui permettrait d'insérer un espace insécable ? Merci d'avance, Grégoire

Pourquoi les éditeurs html (rich text) sont différent pour les content_types et pour les éléments des sections ?

Bonjour, J'ai remarqué que l'éditeur "rich text" n'est pas le même quand il s'agit d'un élément à modifier dans les content_types et dans un élément d'une section. Pour un content_type, la définition ressemble à cela : ``` - description: # The lowercase, underscored name of the field label: Description # Human readable name of the field type: text text_formatting: html # html (uses rich text editor), markdown or text (uses plain text editor) ``` Pour un élément (bloc) d'une section, la définition est légèrement différente : ``` - label: Paragraphe id: paragraph type: text html: true line_break: true ``` Pour autant, le rendu dans l'interface d'admin n'est pas le même : l'éditeur html des content_type inclut notamment les boutons d'alignement du texte et de listes alors que l'autre est vraiment basique et permet uniquement le gras, italique, souligné, barré et l'insertion de liens. Mon client désirant pouvoir centrer ou justifier les textes de ses pages, je me suis vu obligé d'ajouter une checkbox dessous lui permettant de décider de centrer ou justifier son paragraphe. J'aimerais beaucoup éviter ce "monkeypatch", qui m'oblige à ajouter cette checkbox sous chaque élément de type text html dans mes sections.. Est-ce possible ? Merci, Grégoire

Organizing Folder Structure

Anybody know how I can organize my file system better than having all the sections in the folder app/views/sections (i.e. split into multiple folders like: app/views/sections/folder1 && app/views/sections/folder2) When I put my sections into different folders, those sections don't show up in the User Interface

Using variable into section set up

Hi everybody, I use a text_color section setting as select in all my sections. To avoid writing the same c olors array in every section, i have created a variable to store all the custom colors, now I need to use this variable in section settings like this ` { "label": "Theme color", "id": "theme_color", "type": "select", "options": colorsSpectre }` but it's not working. How can I do it? Thank you for advance
ANSWERED

Unable to update a content type

Wagon: 2.4.1 We currently have a problem where we cannot edit add a field to a content type. We are able to edit details about current fields but when it comes to adding a _new_ field, the `deploy` command is not working for us. This site was handled by many other developers and has sat a bit stagnant. These are the steps we take: 1. Add a new field to a content type 2. Use command `bundle exec wagon deploy staging -r content_types -vvv` Should this not add a new field? We have come up with a workaround that is a bit inconvenient where we delete the content type and then re-add this. This also means we have to deploy all the data with it. If anyone is able to help us out with this issue, we'd be very grateful.