In a galaxy not so far away, we find ourselves wondering how much we can push the digital realms of the modern design in Power Pages. To accelerate development, we rely on the out-of-the-box low-code components. By embracing the Force of Power Pages, we democratize web design and reimagine operations.
As a former Change Manager, I appreciate the importance of how-to guides or FAQs in any website. No matter how simplistic or sophisticated a site is, having this kind of material:
reduces the load on your customer service and
maximizes the length of onsite sessions your customers have and the success rate of a complete purchase (or your corresponding funnel metric)
Do or do not, there is no try....So what choices do I have?
hosting the content directly on your Power Pages site,
pointing to another public domain (e.g. external sharing through SharePoint or OneDrive)
knowledge articles
hosting an attachment
Option #1 is laborious for your content owners/ marketing team as they have to update the website directly through the Design studio. Mind you, this kind of users may not be as familiar with Power Pages, and you will need a level of governance and security to avoid hiccups in production. Versioning management is also not straightforward in this case, and I would not recommend this option as a result overall.
Option #2 is a bit of a labyrinth. Whilst external sharing exists for documents e.g., in SharePoint or OneDrive, you must plan permissions carefully. Otherwise, you may be opening yourself up to a compliance-prone lightsaber strike. All sorts of exploitations may happen, and we must also consider general standards as outlined in ISO 27001.
Option #3 relates to the integration of knowledge articles from Dynamics 365 Customer Service with Power Pages. This is where you will manage your articles within the Customer Service Hub, alongside Power Pages Management. But what if you do not have the appropriate license for it?
This is where option #4 comes in. It brings security, ease, and convenience by managing attachments completely within Power Pages as web files. Your content owners/ marketing team can now maintain that document separately, and once ready upload the latest version in the Web File. This limits the need for a license, access to Power Pages or an extended approval workflow.
Where does this component live and how does it work?
If we inspect the out-of-the-box components in the Design studio, there is no way to add attachments. We can see an image one or a video one for example, but no attachments or web files. So where is it?
Go to Power Pages Management, and under Content you will see Web Files.
In case you are wondering how Web Files work:
Power Pages leverages the attachment feature of the notes associated with a Web File record.
The most recent note’s attachment is the one used and displayed.
It is important to note the size limitation for your Web File will relate to your Dataverse environment configuration. This can be done in the system settings email tab as explained here.
Feel the force; Let’s get configuring
From the Web Files area mentioned area, click on +New.
Add a Name for your Web File which will host your attachment.
Choose your Website from the dropdown, and a Parent Page in case you want it to be part of a specific path. For example, you may not want to host the attachment in the homepage but rather in the FAQs. This is where you choose it as the Parent Page.
The Partial Url is the path ending you will see when the attachment is clicked on to be viewed.
Publishing State: A mandatory field to determine whether this file should be Published straight away for everyone to see, or to be in Draft for users with Preview-only permissions to review first. This is helpful as part of a review/ approval workflow.
Dates: None of these mandatory. A few options here. Display Date: No functional purpose, but helps informs users when this file was published and how up-to-date it is. Release Date: It actually controls when the file attachment actually appears on the site. (the only exception is preview-only permissions from certain users.) Finally, Expiration Date controls when the file stops being visible (same exception applies for preview-only user permissions).
Content Disposition: Choose inline if you want to render it in the browser window first, or attachment if you want the user to be asked to view/ download straight away.
Display Order: Will determine the hierarchy if you have multiple children files linked to the same path.
Click Save.
Now you can add your file from your local/ online drive by uploading in File Content. Click Save again.
Control, control, you must learn control...with file downloads
With the existing set up, downloads are not enabled by default.
If you want to allow users to download the file too on top of viewing it, go into the Web File record and add the below in the Summary (HTML) area.
<a href="/(partial URL)">Select here to download the (user-accessible file name)</a>
Remember to substitute the (partial URL) with what you set up, and the (user-accessible file name) with a name users can relate to.
Patience you must have young Padawan...where's my link?
Now you have your Web File, it is time to go back to the Designer Studio and click on Sync.
The final step is to construct the URL yourself by concatenating: <homepage>/<parent_page>/<partial_url>
Always in motion is the future...how do I add the link back?
Go to the Designer Studio, and in a text component for example add the new URL as a hyperlink.
Et voila! May the file attachment force be with you.
Awesome 👏 Is there a way to hide the toolbar ? I thought of writing a jquery to set dispaly:none but the iframe document doesn't show the pdf page in the body.
Nice! 😊 thanks for sharing!