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

Make it easier to add documents to pages #705

Open
willguv opened this issue May 8, 2024 · 4 comments
Open

Make it easier to add documents to pages #705

willguv opened this issue May 8, 2024 · 4 comments
Labels

Comments

@willguv
Copy link
Member

willguv commented May 8, 2024

Mentioned at LGD Camp, and also picked up by @benhillsjones in Dumfries

As a content designer
I need to insert a document at a specific point on a page and give it custom link text

@dedavidson has been working on a fix for this

@willguv willguv changed the title Make it easier to add images and documents Make it easier to add documents May 8, 2024
@willguv willguv changed the title Make it easier to add documents Make it easier to add documents to pages May 8, 2024
@dedavidson
Copy link

The fix for this is to add config to modules/localgov_media/config/optional/linkit.linkit_profile.default.yml the localgov_core project. ( https://github.com/localgovdrupal/localgov_core/blob/2.x/modules/localgov_media/config/optional/linkit.linkit_profile.default.yml )

It requires adding the following config to the matchers section:

  <a uuid>:
    id: 'entity:media'
    uuid: <a uuid>
    settings:
      metadata: ''
      bundles:
        document: document
      group_by_bundle: false
      substitution_type: media
      limit: 100
    weight: 0

@SarahQ83
Copy link

How would this fix then work for an editor?

@markconroy
Copy link
Member

Hi @SarahQ83

If you are familiar with how the LinkIt module works, we would just be extending that to allow linking to documents as well as other pages on the website. At the moment, LinkIt only searches for other pages on the site.

If you are not familiar with LinkIt, it's a module that helps with creating links in a wysiwyg editor. It allows us to search for a piece of content to link to, and then insert that link in the wysiwyg. Crucially, if the URL for the link ever changes, you do not need to go back to where you added the link in the wysiwyg as LinkIt will automatically update all references to the link.

===
Thanks to Big Blue Door for sponsoring my time to work on this.

@SarahQ83
Copy link

SarahQ83 commented Jun 5, 2024

Hi @markconroy that sounds simple enough, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

4 participants