I’m using the CMS for the first time and just wanted to check the best way to build a list of links on an article. Please see this two minute video below…
If you want to use up available fields then your approach is one option. I would just create one rich text field to represent all the links in an ordered list the problem will be lack of ID
s to target so you would need to use data attributes. You could also use custom code within the new RTF as an embed. Another approach is to create the whole thing with JavaScript making it dynamic. Of course, you would need to write the code or hire someone to do it. Scripts like tocbot basically create a dynamic table of contents so you could review that as an option.
I’m trying to implement this but a bit stuck about how to link using data attributes. If you could help advise me how to do this, I’d be very grateful. Please see this short video and share link below…
You can’t link to a data attribute but you can write code that loops through elements that have a certain attribute, then add an ID to each element, which would give you something to link to. Custom code.
I just double checked CMS bound rich text fields and there is not option to add data attributes like there is on unbound RTF’s. However, you can insert custom HTML as many times as needed, inside a bound RTF. So you could add headings with and ID attribute of one, two, three, etc… and link to them via a manually created list. Probably not editable from the editor. You might be better off using tocbot or similar script for dynamic tables of contents.