People jokingly (or not) sometimes tell me the only reason for which they use the intranet is the cafeteria menu. So on a recent draft of a redesigned homepage, I introduced a prominent “Menu” button that would always be linked to the most recent menu uploaded by dining services.
Previously people would click a link which took them to a document library where the current menu lived, and would open it there. 2 clicks.
I had two goals for this project.
- Get it down to 1 click.
- Never have to manually update the link for the button. Set it, forget it.
Note: this could easily be applied to newsletters, updates, meeting minutes, etc. Anything that is published on a regular basis that could benefit from an always-current hyperlinked button.
Here’s how you can do the same:
You need:
- Document library or list where you keep your menus or links to menus
- A classic view SharePoint page where you’ll be placing it (not compatible with modern experience)
- Create your graphic for the button (any image file). Feel free to download my chalkboard, and overlay your own text. Once edited as you’d like, resize to ~120×143 px. Upload the image to your Site Assets folder or wherever you place images like these in your SharePoint environment.
- Copy the URL to the newly uploaded image
- Navigate to the document library or list where you’re keeping your menus or links to menus
- Click “Library” from the ribbon menu then “Library Settings”
- Create column
- Enter column settings, and make sure to remove the column from any views. You won’t need to see it for anything.
- Name your column. I called my column “WF_Img”
- If menus are the only thing in your library OR if you will only be doing a project like this for menus, just create a single line of text and set the default value to your image’s URL (recommended). Any items added after the creation of the column will get the image by default.
-OR-
If you have multiple types of documents, create a calculated column (text format) that will look at a field like “Category” to determine if the document is a menu or not.
=IF(Category="Menu","https://domain.sharepoint.com/site/SiteAssets/menu.png","")
This will allow you to do similar projects later with the other files if they need a thumbnail/button/icon
- Create a content query web part on the classic/wiki page where you’d like to place the button.
- Click in white space or “Add a web part” where you’ll place the button
- In the ribbon, Click “Insert” –> “Web Part”
- “Content Rollup” –> “Content Query” –> “Add”
- This step might work best in Internet Explorer: Modify the settings for the newly added web part
- Click the dropdown arrow on the new web part and “Edit web part”
- Select “Show items from the following list” and paste or browse to the list or library where you upload or add your menus
- If your menus are a specific content type, select that to filter results. You can also use “Additional filters” to say things like “Show items when CATEGORY is equal to MENU.
- Sort items by Created in descending order, and limit the items to display to 1
- Set item style to image only, clickable
- Leave Link to the default value (URL Path) and add WF_Img; (or whatever you named your image column) to the Image field
- Set Chrome Type to “None”, Click “OK” and Save/publish the page
- Click the dropdown arrow on the new web part and “Edit web part”
That’s it! Your button will always be linked to the most recently created file or item.
2 Replies to “How to create a dynamic “this week’s menu” button for your intranet”