How to link to a specific page? (translation agnostic) #1364
-
Hi everyone First of all: I'm super happy to have found Spina. Finally a developer focused CMS that is simple and works nicely :) Thank you for all the effort that is put into this ❤️ I have a question which is was not able solve via the docs nor some code research: What is the best way to link to a specific page from my views, e.g. in a hero header where I want a fixed call to action to point to a specific page? I'm not using the ::Text part, so my hero header mostly consist of ::Line and ::MultiLine. The call to action button in the hero is static and has a ::Line attribute for the text and should point to a specific other page from the CMS. I think i could use something like What is the best way to do this? There is no ::Link attribute that would allow a CMS user to set the link in the UI. Oh, and important: the link should be "language agnostic", eg. if the user is browsing the French version of the page it should also link to the French variant again. Thanks for the help 🙏 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Thanks for the kind words! You're looking for custom pages. You can add multiple custom pages to your theme config under theme.config_pages. Those will all get a custom name, similar to your homepage. That way you can easily reference those kinds of pages without having to hardcode IDs. |
Beta Was this translation helpful? Give feedback.
Thanks for the kind words! You're looking for custom pages. You can add multiple custom pages to your theme config under theme.config_pages. Those will all get a custom name, similar to your homepage. That way you can easily reference those kinds of pages without having to hardcode IDs.