Streaming live at 10am (PST)

Link settings for CMS buttons

#1

Am trying to set up a CMS button to link to an existing page without having the editor enter the full address https://website.com/page

I want them to be able to select which page to go to from the existing pages.

Have set up a dynamic button with the CMS. The editor has fields to edit the button text and the button link. But the link field only takes external links requiring the full https://website…….

Is there a way to bring up the existing pages as an option?

Using the on-page editor, when I look at the link settings for other buttons I get options to choose the link type - external, page, section, email, tel.

When I look at the link settings for the CMS button I only get - external, email, tel.

#2

You can

  1. have a text field where the collborator enters only the slug of the page. You’re then using custom code to input the URL, and use the slug variable to complete it http://domain.com/{slug-from-CMS}. Problem: the editor needs to know the slug and to enter it correctly.
  2. same than above but you make an Option field, and enter all the options yourself, options being the slugs of the pages (they have to have a meaning, then). In this case, editor choses in a dropdown list, which is cool.
  3. you make a Pages collection that you reference in your other collection. And in the Page scollection, you have name, URL, slug… all the infos you need to craft a link to the pages. And you add the pages item yourself, referencing all the pages of the site that will need a link to. Like in 2., editor will then chose the page to link in a dropdown menu.
#3

It’s probably possible to add a Rich text Field with a link inside of it, styled like a button. And the Editor can edit the link and probably unfold this Pages menu and chose to link to a page of the site. Have to be tested, I’m not sure this works. I don’t find this solution very elegant.