Discussions
Order many_to_many relations
Hello, I have two models with a `many_to_many` relation. I want to display these models on a page in the same order as I set in back-office, but instead they are ordered based on the setting in my model definition file. Is there any way to control the display order in the Liquid template?
Regards, Igor
Posted by Igor over 1 year ago
Locomotive doesn't allow me to add noscript and object html to text field in backoffice
When I add tableau code with some noscript and object tags and save it, code just disapppear
Posted by Misha Shelestiuk over 1 year ago
Separate section for each content_entry page
Hi, I'm building an ecommerce shop with Locomotive CMS. I want to add a gallery with a dynamic number of photos to each product. I've created a template page for my product entries and then added a gallery section to the template. I expected to able to edit the gallery on each product page separately, but the content is the same on all product pages.
Is it possible to build what I want with sections and a content entry template?
With best wishes to you.
Posted by Alex almost 2 years ago
Single content entry in edit section control
Hello, i would like to implement section view based on some content entries that need to be selected from edit section panel. In documentation described definition of section with content_type field, but it only create a link to content_type page. Is any way to select one entry from box, or i need to implement this functionality by myself ? Thanks for your answer.
Posted by Igor almost 2 years ago
mass deleting "public submission" data
Thanks to Didier and the LocomotiveCMS team for building such a nice CMS!
I have a question:
On a customer website there is a backlog of "Contact messages" (almost 6000).
Right now, the "page level block delete" gets the 10 items per page (those being being displayed), which would mean that there are 600 pages of three clicks on each to delete this old data.
Is there a way to display say 50 (or 100) items per page so that there would be 120 (60) pages needed to delete this old data?
One other option is me trying to delete it through the mongo backend, but this is not available to the customer.
Posted by John Read about 2 years ago
How to Avoid Public Submissions Accepted on All Paths?
It seems Locomotive accepts public submission POST requests of any `content_type` to any path.
Is there a way to change this behavior so that form submissions only work with the public submission url \(/entry_submissions/\<content type slug\>\)?
This way, we can easily lock out spam bots which don't run javascript.
Posted by Tobias Geisler almost 5 years ago
Populate associations from public submissions
Hi,
Based on the contact form guide I've made a form that adds some details, and tries to add associated data (through checkboxes). The form works fine until I check and boxes, then I get an "undefined method `association_ids=' for #<Locomotive::API::Forms::ContentEntryForm>"
Is this possible through public submission?
Thanks
Lawrence
Posted by Lawrence Nicholson about 7 years ago
Path_to single entry
Hey!
So I'm doing first steps, the basic stuff. And I'm stuck on this step – https://locomotive-v3.readme.io/docs/use-them-in-templates. Path_to link to a single entry generates empty space and thus the link just reloads the page we're on. I checked docs and my code like 10 times, I don't get what I'm doing wrong and where's the problem.
Any help and advice would be much appreciated.
Posted by Vlad Arbatov about 8 years ago
order_by attribute on with_scope not working?
Neither on the engine nor on wagon, this ordering seems to work:
```
{% with_scope start.gt: now, order_by: 'start.asc' %}
{% assign future_events = contents.events %}
{% endwith_scope %}
```
The order as defined in events.yml is start.desc, which is also the order I get regardless of the order defined in the with_scope tag.
Posted by Tobias Geisler over 8 years ago
Creating related objects via form
Hey Everybody,
I have a form with used for public submission. That form is placed on the `event` page and creates an `open_subscription` and `open_subscription` belongs_to `event`. Now the issue I have is that it creates the `open_subscription` entry but the event field stays empty. I have tried everything I could think of but still no success.
Has anyone worked with forms that create related objects? How did you implement it? Any suggestions?
Here is a gist with my code: https://gist.github.com/DonKoko/ff8d59d42d9357ef5cb0fc6545d30876
Posted by Nikolay Bonev over 8 years ago