Jump to content

How to get a Pages record URL by ID?


Recommended Posts

I am working on a Pages template and I want to get the URL of a record of another database.

To get the URL of the current database I am using this code:

{{$url = \IPS\Http\Url::internal( "app=cms&module=pages&controller=page&path=" . \IPS\cms\Pages\Page::loadByDatabaseId( $record->database()->id )->full_path, 'front', 'content_page_path' );}}

And how to get the URL of a record from another database using the record primary id field?

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...