-
Notifications
You must be signed in to change notification settings - Fork 9
Make it easier to add documents to pages #253
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
Comments
The fix for this is to add config to It requires adding the following config to the
|
How would this fix then work for an editor? |
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. === |
Hi @markconroy that sounds simple enough, thanks |
To maintain consistency with adding documents via the Media button and to reduce the manual effort, it would be good if when you added a document via Linkit, the file type and size is included at the end of the link. |
I have a PR for this. @RyanFH257 this won't add the file size, etc in the URL. LinkIt is just for creating basic links. If you want that extra metadata you will need to embed the document via the media widget as normal. @SarahQ83 if you want to add this to your existing site, go to Thanks to Big Blue Door for sponsoring my time to work on this. |
Another way might be the embedded media entity. This will allow the content designer to browse for a document and embed it, displaying the file size / type etc.. This would not allow customised link text. @Adnan-cds has some solution that is similar to the requirements. |
From Slack: ekes (agile/iskra)
8000
Mark Conroy (the-confident.com) Rupert Jabelman (Chicken) Alistair Wearring (West Lindsey / North Kesteven) Louwrens Erasmus (Big Blue Door) ekes (agile/iskra) Louwrens Erasmus (Big Blue Door) Alistair Wearring (West Lindsey / North Kesteven) |
@ekes has another clever (crazy?) approach which he might be able to share? (Something that involves a new database table which is used as a lookup before the full Drupal bootstrap) |
@willguv to review how does GDS does this eg https://www.gov.uk/government/publications/the-state-of-health-care-and-adult-social-care-in-england-in-2012-to-2013 Local gov doesn't generally do this. We need to discuss with the content group what's typical now and the best way forward Ryan: raised linking to external docs Paul B: forces format and size to appear in link text (check for examples). When doc is uploaded, provide an easy read name and number of pages Here's the nicer styling https://haringey.gov.uk/about-this-website/website-improvements/past-future-user-research and some of the inline styling examples are here https://haringey.gov.uk/children-young-people-families/send-local-offer/send-improvement/send-executive-board James: Some guidance on this page, encouraging not linking directly to docs where possible: Content design: planning, writing and managing content - Links - Guidance - GOV.UK |
From @benhillsjones As a content designer Two current issues:
|
@finnlewis @ekes thinking aloud here Going back to the original need from @benhillsjones:
@markconroy's proposed change around extending the LinkIt module seems to cover this Steps for an editor:
We can then choose whether to append file size/ type etc While linking directly to a doc isn't good GOV.UK practice, it's common in local gov and think we need to support it This route would also allow an editor to select a publication, which is what GOV.UK recommends What's being linked to?Finn asked
I think if users and editors are expecting anything, it's probably b). Rolling over the link shows the thing that's going to be downloaded. I've not asked content group recently, but can go back to them Versioned docsI've not considered councils wishing to replace a doc with a new version. Would https://www.drupal.org/project/media_entity_file_replace mentioned above do that? |
From my notes above. Yes. Unless you use an upstream cache - which is almost everyone. Then it needs flushing if you make a change it seems. |
Discussing with @danchamp , received wisdom on presentation is: The link to the file should:
Actual file name?
Other thougts:
|
Does option c) set us up better for future work on caching @finnlewis? Also @ekes mentioned standard Drupal behaviour - which option is this please? Thanks both for quick replies |
Let's discuss this in #254 Closing issue |
Opening this again, we've not resolved this just yet! |
Uh oh!
There was an error while loading. Please reload this page.
Mentioned at LGD Camp, and also picked up by @benhillsjones in Dumfries
@dedavidson has been working on a fix for this
The text was updated successfully, but these errors were encountered: