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 over 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 over 3 years ago
Custom metafields per page
Hi! I recently discovered Locomotive CMS and I'm quit happy with it. But I'm missing the option to define custom fields for all pages. (Every page has the fields, but they are individually per page)
For Example: Every page should have an open graph image and an open graph description. (The authors should be allowed to edit them)
It there a way to define metafields per page? It would be nice to define own tabs, additionally to content, settings and seo. Another solution would be to create own SEO fields.
Thanks in Advance
Posted by max over 4 years ago
How can we set Canonical URL for every page in locomotive CMS?
We have a requirement to set the canonical link in every page of the site that we have developed using locomotive CMS. I initially thought that we can set a custom value in YAML header of every page and access it in page drop. But that is not possible. So is there is any solution for this please?
Posted by Nanditha about 8 years ago
Content of cild page
When looping out out content of sub pages images turns out as Null running engine.
When running locally with Wagon images from child pages is returned as expected.
Other editable elements wok in both cases.
```liquid Liquid
{% for subpage in page.children %}
<a href="{% path_to subpage %}">
<img src="{{subpage.editable_elements.content.main.main_image }}">
<h2>{{subpage.title}}</h2>
</a>
{% endfor %}
```
Posted by Claes Pontusson over 8 years ago
How to relate pages handlers in a content type
How to relate pages handlers in a content type to use it as a select field to set links to pages.
Posted by Ricky Fletcher over 8 years ago
path_to result is empty
I have been trying to setup a nav bar in my app (actually migrating locomotivehosting.com to this). I can't get the path_to function to return anything useful.
I have page with the handle of "products". I have tried these with all of them returning nothing.
I have tried these variations.
{% path_to products2 %}
{% path_to 'products2' %}
{{ path_to products2 }}
{{ path_to 'products2' }}
Posted by David Cook over 8 years ago