Timeline for How to link to an entry in a Markdown field in the CMS
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 13, 2018 at 0:30 | vote | accept | Ryan | ||
Mar 9, 2018 at 21:23 | answer | added | plaintxt | timeline score: 2 | |
Aug 11, 2017 at 12:24 | comment | added | Ryan |
The field isn't Rich Text; it's just plain text, and the template code uses the |markdown filter. I know how to make a link in markdown [text](url) but I'm wondering how to fill in the url dynamically based on id. http://mysite.com/#entry:2 doesn't work because it prints exactly that string out as the url. I want #entry:2 to convert into the uri for that entry on output.
|
|
Aug 11, 2017 at 1:50 | comment | added | Damon |
I don't think I quite follow. If you highlight text (redactor for example) Craft will convert that for you. Just highlight the text and chose link -> entry Which will look something like this in the markup: http://mysite.com/#entry:2 You can change the #entry:2 title, slug - whatever and everything will still work since Craft is linking to the entry. It doesn't care what you call it.
|
|
Aug 10, 2017 at 23:44 | comment | added | Ryan | Yeah, how do I get the url like that based on an id? | |
Aug 10, 2017 at 4:08 | comment | added | Damon | For example, highlight text in a rich text area and link to an entry? | |
Aug 9, 2017 at 19:50 | history | asked | Ryan | CC BY-SA 3.0 |