lektor / lektor-website

The main lektor website.
https://www.getlektor.com/
Other
160 stars 134 forks source link

URLs and Slugs page examples #213

Open alan-cugler opened 6 years ago

alan-cugler commented 6 years ago

This is kind of a silly issue, but there are several paragraphs on how extensively versatile these two features are, at this link. Then there is a small example of how it might look in the .ini and .html files here.

However, I had to actually guess at how to link the pages together when I input the file path for root from the CMS.

model.ini code snippet:

[fields.link]
label = URL or File Link
type = url

model.html code snippet: <a href="{{ this.link }}">

Then in the CMS I finally just put a "/" in the input box, after trying (and failing) to find an example of how to link home. I'm probably just not good at understanding those complex paragraphs of explanation, but the examples of code used to teach a feature are worth a thousand words.