You need to customize SharePoint search display template. And you could get the item URL with ctx.CurrentItem.Path
, then you could get the ID value and append it to the view page url.
SharePoint 2013 Customize Display Template for Content By Search Web Part (CSWP)
Understanding how classic search results are displayed in SharePoint Server
My simple test :
<a href=" http://sp/SitePages/WikiWiki.aspx?_#= ctx.CurrentItem.Path.split('?')[1] =#_">http://sp/SitePages/WikiWiki.aspx?_#= ctx.CurrentItem.Path.split('?')[1] =#_</a>
Test result:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.