Discussions
link_to single page not working
Hi,
I'm trying to use the [link_to liquid tag](https://doc.locomotivecms.com/docs/tags#link_to).
The documentation linked above makes it seem very simple, but I just can't make it work.
I have a page called "ecosysteme" (that's its slug) and I simply wrote:
```liquid Liquid
{% link_to 'ecosysteme' %}
```
According to the docs this should generate something like `<a href="/path/to/ecosysteme">Écosystème</a>` but nothing is displayed when I use it.
What have I done wrong?
Posted by Grégoire Colson about 3 years ago
How wan i edit content types fields names
Hi,
I just changed a field name of one of my content types from "location_name" to "name".
I also changed every reference to "location_name" in the others files, and especially in data files, to avoid issues.
Nevertheless when i try to deploy my site locally this error show up : ` Resource invalid: entries_custom_fields is invalid, #0: Label is already taken`
The error seems to alert about the label attribute of the field, as if it was trying to create a new field instead of overwriting the existing one.
If it's the case it makes sense that there is a conflict with the already existing field with the same attributes. But it seems really strange to me not to be able to edit fields in some files without breaking everything...
Posted by Grégoire Colson about 3 years ago
how to add anchor links in menu
My pages include multiple sections that i'd like to reference in the menu as sub-links (anchor links, with #) of the pages links.
Example : I have a "Home" Page with 3 sections with ids "section-1", "section-2" and "section-3".
In the menu I display the main "Home" link and when hovering this link i'd like to display 3 anchor links to go directly to the corresponding sections.
Is it possible ? The "page" liquid drop doesn't seem to include the page content of sections, so I wonder how to achieve this.
Thanks !
Grégoire
Posted by Grégoire Colson about 3 years ago
Can't install last version of Wagon. Only v.1.5.8 seems installable
Hi,
I'm struggling at the very beggining of the "Quick Start" Guide, as I simply cannot install the latest version of wagon (3.0.5 at the time i'm writing this).
I'm using Ubuntu 20.04 and I installed ruby following this guide : https://gorails.com/setup/ubuntu/20.04
Then I try to install wagon using gem install locomotivecms_wagon
but it installs the version 1.5.8.
So I try forcing the latest version using gem install locomotivecms_wagon -v 3.0.5 but i got the following error :
ERROR: While executing gem ... (NoMethodError)
undefined method `request' for nil:NilClass
Can somebody help me here ? I really don't understand what's going on. I never experienced such issues with other standalone gem installations.
Thanks a lot,
Grégoire
Posted by Grégoire Colson about 3 years ago
List pages in menu vs sitemap.xml
Since v3 or v4 sitemap.xml is populated by pages which are tagged as "listed". In previous version we used to use this attribute to know if the page should be listed in the menu or not.
But now we would like to send to sitemap all pages and keep using "listed" for our menu.
Is it possible to add a new attribute to split these functionality from the dashboard ?
Posted by RB about 3 years ago
Forcing site-goers to login, question
Hello,
I'm an admin trying to debug something going on the locomotive CMS for a client. The issue I'm facing is that after clicking a link on the preview/mysite, it redirects to the login screen for https://station.locomotive.works/_app/sign_in
All of the pages' published status is set to "published" in the CMS so I'm really not sure why this behaviour is occuring.
I would like to take the site live (point the domain to locomotive), but I'm not sure if the behaviour would carry over, and if it does that would be a significant problem.
I would be happy to provide the exact website in an e-mail, but let me know if this behaviour is intended across your hosted sites, or might be case-specific to my site for some reason.
Thank you
Posted by Ryon over 3 years ago
Resetting site content to default
I have noticed that whenever I change default values in a section or config files like translations.yml then "wagon deploy" to my site, the values on the site do not change.
This makes sense from a content management standpoint, but there are times where it would be convenient to forcibly reset these values. For example, I recently changed a large number of translations in my yml file, and it would be a chore to go through and update them all by hand in the back office. Is there any way to force the site to revert to the default values? I would like to be able to reset, for instance, just one page or just the translations without nuking the whole site.
Posted by Dawson Coleman over 3 years ago
Any way to delete a section?
I'm trying to delete a section. I've made some breaking changes (e.g. changing block types, etc) and want delete the section and re-deploy.
I tried running `bundle exec wagon delete staging -r sections -v` but received a garbled error message including the following:
*"Resource must be one of page,content_type,snippet,translation if you pass an identifier OR be one of content_types,snippets,theme_assets,translations if you want to delete all the items of that resource. (ArgumentError)"*
Is it possible to delete a section?
Posted by Luke Grayson over 3 years ago
Any way to delete an asset from a metafield type: image field?
I've set up a number of metafields with `type: image`. They work as expected.
However, if I add an image to a particular field and then decide I no longer want an image applied to that field, there is no way to delete the image. I can delete the image from the Assets section of the Admin panel ("Back Office") but what if I don't want to do that? What if I want to retain the image to use elsewhere but simply don't want it applied to my metafield?
There doesn't appear to be a solution at this point.
Posted by Luke Grayson over 3 years ago
Search possibility
Hello, I'm looking for adding search functionality to the site. I can't find any information in the docs. Can someone help me to understand if it's possible?
Posted by Sergey over 3 years ago