Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added LocalGov Preview Link module #692

Closed
wants to merge 1 commit into from

Conversation

stephen-cox
Copy link
Member

This PR adds a new module that makes it easy for content editors to add all pages in a guide or step by step to a preview link.

The module adds a new button that will auto-populate the entities on a preview link page.

image

Part of #600

@stephen-cox
Copy link
Member Author

@Adnan-cds @andybroomfield @ekes @finnlewis @and anyone else.

I'm not sure this is the best way to add the achieve this, so your thoughts are welcome.

What we want to achieve here is an easy way to add all guides, step by steps and subsite pages to the preview link entities list.

The approach I've taken is to put all the code to find the entities into a new module in the profile. It would be cleaner and possibly more extensible if each module supplied it's own logic to say whether adding multiple entities like this is supported and, if so, supply the logic to get all the related entities.

I suspect the Drupal way to do this is through a plugin system, but this seems overkill to me. But maybe not?

Thoughts?

@andybroomfield
Copy link
Contributor

Nice, thanks @stephen-cox.
I'd condider making this a seperate module and not limiting it to the profile, as it's likley to have utility in other cases and not all LGD sites install via the localgov install profile. (Profile modules can't AFAIK be used outside the profile).

@finnlewis
Copy link
Member

Discussing in Merge Tuesday meeting with @ekes :

It would be good to include this somewhere other than the profile.

The main arguments for not putting it in the profile:

So maybe we should move this sub-module to localgov_core (if we assume everyone wants it), or have it as a separate project (if it is useful as a standalone project).

@finnlewis
Copy link
Member

Discussing at Merge Tuesday with @stephen-cox :

  • Relatively straight forward to add this to the https://www.drupal.org/project/preview_link module as a plugin and service
  • We can then implement the plugins in our modules.
  • Estimating around 10 hours to get it all done

I think that sounds like a great direction of travel!

@stephen-cox stephen-cox marked this pull request as draft April 9, 2024 11:15
@stephen-cox
Copy link
Member Author

Closing this as there's now an MR adding this functionality to the Preview Link module: https://git.drupalcode.org/project/preview_link/-/merge_requests/28

@stephen-cox stephen-cox deleted the feature/3.x/600-autopopulate-preview-links branch May 21, 2024 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants