lektor-website icon indicating copy to clipboard operation
lektor-website copied to clipboard

URLs and Slugs page examples

Open alan-cugler opened this issue 6 years ago • 0 comments

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.

alan-cugler avatar May 18 '18 21:05 alan-cugler