localgovdrupal / localgov_services

Provides the pages and navigation for presenting the Services provided by Local Government. A part of the LocalGovDrupal distribution.
GNU General Public License v2.0
3 stars 4 forks source link

Linking to non-D8 pages from D8 landing pages #93

Closed OliverHannan closed 2 years ago

OliverHannan commented 3 years ago

Adding either external or D7 links to D8 landing pages, there is no option to add summary text, summary text is not pulled through from D7 pages. Just left with the title - see these 2 pages.

image

https://lbc-app-w-corpwebsite-p.azurewebsites.net/business-licences-and-tenders/running-business/business-support-and-advice

image

https://lbc-app-w-corpwebsite-p.azurewebsites.net/business-licences-and-tenders/running-business

Is there any way to rectify or bypass this?

andybroomfield commented 3 years ago

BHCC Would also be interested in this (Our solution is to set up redirect pages that can be included with a teaser, but then link off).

What would be the best way forward? A field formatter that if its an external link could add a custom summary?

danchamp commented 3 years ago

BHCC Would also be interested in this (Our solution is to set up redirect pages that can be included with a teaser, but then link off).

Cumbria have also just bumped up against this issue. I came up with the same workaround @andybroomfield but it's a bit ugly!

andybroomfield commented 3 years ago

I think there is scope here to change the link format fir sub hubs as they are paragraphs (or are they link fields) and have the option to craft a custom snippet here if something can't be picked up.

Else the alternative would be to have a crawler go out and fetch the external page and use the meta description tag.

andybroomfield commented 2 years ago

A quick bump on this. I notice in sub landing module (and in legacy BHCC code) there is a dummy-teaser.html.twig template that gets used for external links. This has space for the link title and url. It could be expanded to also include some teaser text? and the field widget could add extra support for a manually crafted teaser. External links seem to crop up a lot, and as its a link field not an entity reference, they should be supported. This could also extend to support links to pages that do not have teasers such as views so there is fallback to implement some summary text.

willguv commented 2 years ago

Replaced by https://github.com/localgovdrupal/localgov_services/issues/152 with an updated description, linked back here for conversation