Sparkle's On Click inspector allows you to add a link or action to any text, image, button, menu item or group.
By default the option is set on "Do Nothing”, but it can be set to a number of options, that are the same across all elements that have the “On Click” action. Images and buttons have additional options, check the respective documentation pages.
Go to Page in This Website
Sparkle knows about all the pages in the site, so it makes it really quick to pick one as a link destination. One additional refinement is picking a location in the page, so that when the user clicks on the link the browser will smoothly scroll to the selected location.
Scroll locations can be created both by selecting “New Scroll Location…” and by adding a new one to the page by picking the “Scroll Location” icon on the “Add” popup. Another way to have specific scroll points in a page is to configure the Scroll Location setting on a Layout Block.
Filter the blog entries
If the website includes a blog, On Click menus also add a “Go to Blog Index” option, which in addition to navigating to the blog index also can filter it by the selected tag.
Go to External Link
The is the most general form of link, where you enter a web address (also referred to as URL, Uniform Resource Locator) like you would find it in the browser. The address text box supports web addresses (usually prefixed with http:// or https://) and other kinds of addresses as well.
The Open Email option has a field to specify the recipient's address. Clicking on the resulting link will open a new message in your default client email or redirect to a webmail interface. If spam is a concern, a better option is to create a contact form.
Call Phone Number
The Call Phone Number option will cause the site visitor’s device to make a phone call the specified number (after confirmation).
On many desktop devices the phone call is often routed via video calling software.
The Download file option lets you choose any file on your Mac, such as a PDF or a ZIP archive, to be offered for download from the website. The file will published along with the website, and downloaded from there.
A shortcut to create a link to a downloadable file is to drag and drop it onto the Sparkle canvas, which will create the download link.
Open Popup and Close Popup
These two options are related to the use of popups. You can create a new popup from here or select an existing one. The options also vary based on the context, and opening and closing popups have side effects based on the popup mode and group ID. For more information check the popup documentation page.
This action is used in conjunction with video and audio players on the page, to offer a play/stop button, and a mute/unmute button. This can work for any video on the page, including background video, and any audio. One useful use is to work with browsers blocking autoplaying videos with audio: you can start videos muted and offer a prominent button to enable audio.
Layout Block Visibility
While hiding content on a page is generally to be avoided, there are cases where you have a very large amount of content that you want to selectively disclose. This action can show, hide or toggle the visibility of a layout block, or multiple layout blocks in a group.
Please report any shortcoming in this documentation and we’ll fix it as soon as possible!
Updated for Sparkle 5.2