Create internal link based on page type


#1

Silverstripe Version: 4.6

I want to create a internal link from a start page to a sub page. The subpage is of a specific page type, lets call it A.

Is it possible to easily generate a link to that subpage? For example get link to a subpage of type A?

If I don’t do it like this, I’m affraid that I will get broken links in case I change the URL in the CMS settings for the subpage. I only have one subpage of type A. I know that it is possible to loop throught the sitetree and pick out the page with type A. But I’m wondering if there is some easier way.