# Shortcuts module

**URL:** <https://farmos.discourse.group/t/shortcuts-module/1625>\
**Category:** Using farmOS\
**Created:** [April 19, 2023, 7:18pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625 "2023-04-19T19:18:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![paul121](https://avatars.discourse-cdn.com/v4/letter/p/54ee81/32.png) [@paul121](https://farmos.discourse.group/u/paul121)\
**Post date:** [April 19, 2023, 7:18pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/1 "2023-04-19T19:18:15Z")

</div>

Wanted to share the Drupal core Shortcuts module. I’ve seen this before and meant to share but I don’t think I see it here on the forum, perhaps I mentioned in chat. Alas, some may find it useful as a way to quickly navigate to assets or any other pages that are frequently used.

> I’d like some favorite assets exposed directly on the dashboard for quick access.  
> CC @pat : [Equipment use logs - #15 by pat](https://farmos.discourse.group/t/equipment-use-logs/1624/15)

The module allows you to create “shortcut sets” that are collections of links. Each user can choose a single shortcut set that is available at the top toolbar. Most pages (including assets/logs/other entities) have a star icon that makes it easy to add links to the user’s current shortcut set. Links can also include query parameters which is cool because you can provide filters to the Assets/Logs table views (only show assets with a given flag, or animals of a specified breed).

Note: this is a drupal core module that can only be enabled by the farmOS site admin. I believe it also requires a permission to allow other users to use it.

Here are some screenshots:

Shortcut sets:

 ![shortcut-sets](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/e/ebbdb662b9ce0e4da745d6cb3d19a39a84e08817.png)

Shortcuts toolbar:  
 ![animal-shortcuts](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/1/1ce6b0db04c315f7d4a3c5c5ea3ffff2f7f3dcdd.png)

User selecting desired shortcut set:

 ![user-shortcut-setting](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/a/a0baa6b3b8a7161364a49e303f3da03b6a71ba2c.png)

Add to shortcuts:  
 ![add-shortcut-link](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/1/14b229073d2f4cde21afc38ea27e84732f7e7ac2.png)

Include query params in link:

 ![custom-priority-animal](https://global.discourse-cdn.com/free1/uploads/farm_os/original/2X/1/1e15377e98bb473b539b31fac48c00722e852ae0.png)

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [April 19, 2023, 7:30pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/2 "2023-04-19T19:30:19Z")

</div>

Wow… that was cool.

---

<div class="post-metadata">

**Author:** ![Farmer-Ed](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/farmer-ed/32/662_2.png) [@Farmer-Ed](https://farmos.discourse.group/u/Farmer-Ed)\
**Post date:** [April 19, 2023, 7:46pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/3 "2023-04-19T19:46:28Z")

</div>

Interesting, must give it a try.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [April 19, 2023, 7:49pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/4 "2023-04-19T19:49:21Z")

</div>

I showed this to @gbathree recently! 🙂

Pretty cool to see the custom shortcut paths idea!

---

<div class="post-metadata">

**Author:** ![AmberS](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@AmberS](https://farmos.discourse.group/u/AmberS)\
**Post date:** [June 29, 2023, 4:12pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/5 "2023-06-29T16:12:26Z")

</div>

I’m loving this Module!

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [June 29, 2023, 5:36pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/6 "2023-06-29T17:36:51Z")

</div>

> [@paul121](#):
>
> Note: this is a drupal core module that can only be enabled by the farmOS site admin. I believe it also requires a permission to allow other users to use it.

Wonder if a simple `farm_shortcut` shim module in farmOS core would make any sense? At the very least it could provide the necessary permission to all “managed” roles, any necessary configuration (?), and show as an option in the `/farm/settings/modules` form.

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [June 29, 2023, 9:13pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/7 "2023-06-29T21:13:08Z")

</div>

@mstenta, possible to have this enabled on hosted farmOS?

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [June 29, 2023, 10:00pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/8 "2023-06-29T22:00:26Z")

</div>

@pat Done!

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [July 2, 2023, 3:06pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/9 "2023-07-02T15:06:01Z")

</div>

Hmm maybe I missed something when I enabled it, because @pat is getting “Access Denied” when trying to add shortcuts. But it’s working on @AmberS’s instance.

I enabled the `shortcut` module and added these two permissions to the `authenticated` role:

- `access shortcuts`
- `customize shortcut links`

I think that’s the same thing I did on @AmberS’s (double checked the permissions and they are the same) - but maybe I’m forgetting something?

(Another reason why it might be nice to have a `farm_shortcut` module that sets all this up, so I don’t have to remember how to do it manually. 😅 )

The only other difference I can think of is that @pat’s instance has translations enabled. I wonder if that is affecting things? I will have to test more when I have some time…

Sorry @pat - hopefully I just forgot something and we didn’t discover some strange Drupal core bug here.

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [July 2, 2023, 5:35pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/10 "2023-07-02T17:35:54Z")

</div>

> [@mstenta](#):
>
> Hmm maybe I missed something when I enabled it, because @pat is getting “Access Denied” when trying to add shortcuts. But it’s working on @AmberS’s instance.

Hah.. good thing we have some experienece in such cases  
I switched to UK language, and it works perfect 🙂  
🪲

---

<div class="post-metadata">

**Author:** ![pat](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/pat/32/1050_2.png) [@pat](https://farmos.discourse.group/u/pat)\
**Post date:** [July 3, 2023, 7:42am UTC](https://farmos.discourse.group/t/shortcuts-module/1625/11 "2023-07-03T07:42:26Z")

</div>

@mstenta  
Switched back to NO language, and (maybe obvious) the shortcuts works, but not possible to add new or edit existing.

---

<div class="post-metadata">

**Author:** ![mstenta](https://yyz2.discourse-cdn.com/free1/user_avatar/farmos.discourse.group/mstenta/32/4_2.png) [@mstenta](https://farmos.discourse.group/u/mstenta)\
**Post date:** [July 4, 2023, 12:31pm UTC](https://farmos.discourse.group/t/shortcuts-module/1625/12 "2023-07-04T12:31:14Z")

</div>

> [@pat](#):
>
> I switched to UK language, and it works perfect 🙂

Ah bummer. I did a quick search for existing bug reports in [drupal.org/project/drupal](http://drupal.org/project/drupal) but didn’t see anything. Maybe we discovered a new one. 🤷
