Hey patriciotourne
I'm very happy to have feedback! And your questions show that you understand it well, amazing!
For a looping container, It would be great to be able to add links to items based on content. The closest I got was adding an href Attribute with an Expression value: Container's states:Loop data (my_collection)>id(id). However, I'm not able to prepend the base url so that that id can be placed at the end. The prepend option is available in the HTML Content section however.
That is indeed what you are supposed to do:
- make the element a link (set the "link" property to "url")
- add an attribute "href" to the element and set it to your URL
I guess your problem is to create the URL, and I see 2 options
- you enter the text in "fixed" mode, then switch to "expression", you will see your text becomes a "fixed" property, then you can add a "append" filter, which in liquid is
"http://test.com" | append: id
- you start with the ID, then you use a "prepend" filter like this:
id | prepend: "http://test.com"
I tryied to create a dynamic page but when publishing to Gitlab, I got this error "npm warn exec The following package was not found and will be installed: @11ty/eleventy@3.0.0-alpha.10". This is the complete log:
The line saying @11ty/eleventy@3.0.0-alpha.10 is not found is normal, then it installs it. But the problem is this part:
[11ty] Output conflict: multiple input files are writing to `./_site/proyecto_legislativo/undefined/index.html`. Use distinct `permalink` values to resolve this conflict.
[11ty] 1. ./public/proyecto-legislativo.html
[11ty] 2. ./public/proyecto-legislativo.html (via DuplicatePermalinkOutputError)
It seems that the page "proyecto-legislativo" is a "collection page" as described here
When Silex tries to duplicate your page, 1 for each element in the collection, all the elements have the same permalink (Silex would overwrite the same file over and over again)
It is not clear in the docs (let me know if you can fix it or I can do it) but you need to set the Size
and permalink
, it is important. For the size let's put 1 for now.
The permalink is a work in progress, you will soon be able to input an expression like in the attributes or states. For now you need to input liquid, e.g. /proyecto-legislativo/{{ datasource_id.id }}/index.html
. This is what you need to know:
- replace
datasource_id
with the ID of the data source (you can find it in your site settings > CMS)
- start with a
/
and end with /index.html
Feel free to give more details and I can guide you