1. Home
  2. Blog
  3. Adrian Gordon

Squiz Matrix – How to create breadcrumbs with Microdata schema

The following code shows how to create breadcrumb navigation with Microdata schema in Squiz Matrix.

For example, a page of

example.com/level-1/level-2/page

Would generate

Home > Level 1 > Level 2 > Page

<!-- Breadcrumbs -->
<div id="breadcrumbs">
    <ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
        <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
            <a href="//%asset_url^explode:/^index:2%" itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="//%asset_url^explode:/^index:2%">
                <span itemprop="name">Home</span>
            </a>
            <meta itemprop="position" content="1">
        </li>
        <MySource_AREA id_name="page_lineage" design_area="asset_lineage">
            <MySource_SET name="levels_to_print" value="0" />
            <MySource_SET name="prefix_with_home_link" value="false" />
            <MySource_SET name="suffix_with_current_link" value="false" />
            <MySource_SET name="prefix_with_divider" value="false" />
            <MySource_SET name="suffix_with_divider" value="false" />
            <MySource_SET name="unwanted_asset_types" value="user folder" />
            <MySource_SET name="reverse_lineage" value="false" />
            <MySource_ASSET>
                <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
                    <a href="<MySource_PRINT var='asset_link' />" itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="<MySource_PRINT var='asset_link' />">
                        <span itemprop="name"><MySource_PRINT var='asset_short_name' /></span>
                    </a>
                    <meta itemprop="position" content="<MySource_PRINT var='asset_url_path^explode:/^count' />">
                </li>
            </MySource_ASSET>
        </MySource_AREA>

        <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
            <span itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="<MySource_PRINT var='asset_link' />" >
            <span itemprop="name">
                <MySource_PRINT var="asset_short_name" />
            </span>
            </span>
            <meta itemprop="position" content="<MySource_PRINT var='asset_url_path^explode:/^count' />">
        </li>
    </ul>
</div>
<!-- End breadcrumbs -->

This outputs valid the Microdata:

<div id="breadcrumbs">
<ul itemscope="" itemtype="http://schema.org/BreadcrumbList">
<li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
<a href="//example.com" itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="//example.com">
<span itemprop="name">Home</span>
</a>
<meta itemprop="position" content="1">
</li>
         <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
         <a href="https://example.com/level-1" itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="https://example.com/level-1">
         <span itemprop="name">Level 1</span>
         </a>
         <meta itemprop="position" content="2">
         </li>
                  <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
         <a href="https://example.com/level-1/level-2/" itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="https://example.com/level-1/level-2/">
         <span itemprop="name">Level 2</span>
         </a>
         <meta itemprop="position" content="3">
         </li>
           
     <li itemprop="itemListElement" itemscope="" itemtype="http://schema.org/ListItem">
     <span itemscope="" itemtype="http://schema.org/Thing" itemprop="item" itemid="page">
     <span itemprop="name">Page</span>
     </span>
     <meta itemprop="position" content="4">
     </li>
            </ul>
</div>

How does this work?

This is a fairly simple process – however a couple of tricks are needed to get the position metadata.

How is position being determined?

Let’s take a look at the tag

<MySource_PRINT var='asset_url_path^explode:/^count' />

At first this is a standard tag – outputting the asset url – for example /level-1/level-2/page

Using this output we can determine the position by counting the forward slashes.

The most reliable way to do this is to convert the string to an array using the ^explode:/ function

This gives an array like [“level-1″,”level-2″,”page”]

Then finally counting the length of the array using the function ^count

Which finally gives us the position of 3.

How is the Home url being determined?

To make this code easy to use on multiple sites – we’re using tags to determine the home url.

%asset_url^explode:/^index:2%

We do this using the merge tag %asset_url% which gives us the full url, for example https://example.com/level-1/-level-2/page

Again we use the ^explode:/ function to break the url into it’s segement – this time it will output

[“https:”,””,”example.com”,”level-1″,”level-2″,”page”]

Because the root level will always be in the same position we can use the ^index:2 function to select the home url. Note that arrays are zero-based numbering – so counting from 0 , 1 , 2 … with 2 being example.com

This finally gives us example.com

[REVIEW] Ring Doorbell 2

For a month I’ve been using a Ring Doorbell 2 – a “smart” home security device which doubles as a door bell and security camera – letting you know who comes to your front door.

Here’s my experience using the Doorbell 2.

The unboxing

Unboxing the Doorbell 2 you get an impression of premium quality.

Inside you find the device along with various brackets, screws and instructions – everything you need to do the physical installation.

It even came with a mini level to help you install the Doorbell 2 nice and level. However the level wasn’t perfectly accurate.

It also came with two faceplates – silver and black – helping you match the look of your house.

The setup

Setting up the Doorbell 2 took a couple of attempts – the instructions were unclear and there were issues at almost every step.

  • First it wouldn’t scan the QR code on the back of the device.
  • Then I had to verify my email address – but the email took several minutes to arrive and no matter how many times I clicked “verify” it wouldn’t verify in the setup wizard. I ended up quitting and starting again three times before it worked!
  • Then it instructed me to “plug in your Bridge and wait for it to turn on” without any explanation of what a “Bridge” is (and I still don’t know!)
  • After progressing through the setup wizard – it asked me how far movement should be monitored, but it only used feet … even though I had previously said I was in Australia which uses meters.
  • After getting through the wizard – the advertisements for the “Ring Protect Plan” begin.
  • Many of the support links didn’t work – giving a “oops – the page you were looking for doesn’t exist” error.

It was far from a smooth experience.

Additional costs

After getting through the setup process you discover the Doorbell 2 is missing a critical component – the indoor speaker.

The expectation is that you use your mobile phone as the speaker – but that assumes one will always be available and nearby.

Not to worry – you can buy a “Chime” device for an additional $53 (AUD @ Bunnings). Which seems a bit rich for a basic device that comes with any other doorbell.

After setting up the Chime I realised I couldn’t dismiss the “Ring Protect Plan” reminder which annoyingly sits at the bottom of the app – often covering buttons.

OK – so what is the Ring Protect Plan? It’s an additional $4 (AUD) a month you need to pay to be able to use all the “smart” features advertised! Without this the functionality is so limited you may as well put the Doorbell 2 in the bin (see why below).

Reliability

Unfortunately, this is where things get bad.

After properly setup, the Doorbell 2 accurately detects people – however there’s a 3-5 second delay with the notification. Add to that having unlock your phone, open the app, select the camera and connect to “live view” – you need at least 10 seconds before seeing who’s at the door. Long enough for a delivery to arrive, press the doorbell and leave.

If you miss the visitor AND have a current subscription to the Ring Protect Plan you can review the past footage. Which is why you really MUST have the subscription. BUT it takes a further 3+ minutes for the video to be available to view.

I use a business grade fibre internet connection, quality router and wireless – the delay is NOT in my network. I’ve never had any issues connecting to and using other generic brand IP cameras – only the Ring Doorbell 2.

I suspect some of these delays may be because I’m in Australia and the servers are in America (or some other distant land) – but it’s a MASSIVE delay for a home security device that was not cheap to buy and requires a monthly subscription.

As a side note – the Chime (the indoor speaker device) once disconnected and needed to be turned on and off again. An easy fix, but annoying and again … unreliable.

Functionality

When everything goes well and you can connect to the Doorbell 2 and speak with the visitor at the other end.

The camera quality is clear and decent colour balance. The field of vision wide enough to capture my front door and pathway.

The audio through the phone is good – you can hear them almost perfectly however the audio they hear through the Doorbell 2 is pretty bad – like it has a small crackly speaker inside.

There is an occasional signal loss where you don’t hear a full sentence. But if you speak slowly and clearly you get understand enough to have a conversation.

When it’s windy the audio is difficult to understand, but workable.

The Doorbell 2 only supports 2.4G wireless – which is common, but slightly annoying if you want to use the faster 5G wireless which is becoming standard now

Final thoughts

If the Ring Doorbell 2 has done anything right – it’s shown me how many people come to my house when I’m not home. A surprising amount!

The hardware is a pretty decent – however the software is a real problem. The software is buggy and confusing to setup, slow to connect and randomly disconnects from the wi-fi.

Needing to have a subscription to get any real value is a massive drawback. $4 AUD a month is not massively expensive but having alternatives like local storage or connecting to other cloud services like Google Drive or OneDrive is expected when you are spending $299 AUD on a “smart” device.

It also appears to be a very America-centric device – for example, professional monitoring is only available in America, measurements are in feet, no localised website (e.g. .com.au).

I enjoy having the Ring Doorbell 2 – it’s useful to know who visits.But be prepared to miss a lot of visitors – because the time to connect is often longer than people are willing to wait.

I’ll continue to regularly use it and will (unfortunately) pay for the subscription – but when it fails I will look for an alternative which is more reliable and doesn’t require a subscription.

Windows 10 – How to disable OneDrive downloading prompt

By default, when OneDrive needs to download files in the background – a notification is shown in the bottom right of the window along with a notification sound.

For example, when an album is being played OneDrive will automatically download all the tracks in album.

This is useful to know, but quickly becomes annoying as it continues to appear and play the notification sound.

Fortunately there’s an easy way to disable the notification.

How to disable OneDrive downloading notification

  1. Click on the Windows Start button
  2. Click on the Settings cog icon
  3. Click on ‘System’
  4. In the left hand menu, click on ‘Notifications & actions’
  5. In the right hand pane, under ‘Get notifications from these senders’
  6. Turn off OneDrive

Word 2016 – Merge field codes always displayed

Problem

Any Word document opened that has merge fields – displays the full merge field code.

For example, a field link will show { HYPERLINK } and a merge field will show {  MERGEFIELD }

Solution

This happens when the Word settings have been configured to always show merge tags.

To change this setting:

  1. with Word open, click on the ‘File’ menu
  2. Open ‘Options’
  3. In the left hand menu, click on ‘Advanced’
  4. In the right hand pane, scroll down to the ‘Show document content’ group
  5. Untick ‘Show field codes instead of their values’
  6. Click ‘OK’ to save the changes
  7. Merge fields will now display as normal

Want to view the merge field tags?

For the keyboard commands to view merge field tags see Word 2016 – How to show merge tags

How to install 7-Zip silently

The following process shows how to setup a silent install that will work with 32-bit and 64-bit versions of Windows.

It can be used to distribute 7-Zip to computers using a software management tool such as SCCM (System Config Configuration Manager).

It has been written for 7Zip version 19 but should work for other versions.

Having troubles with the instructions? Take a look at the example download.
Full Download: 7ZipSilentInstall.zip
  1. Download both the 32-bit and 64-bit versions of the MSI installation files from http://www.7-zip.org/download.html
  2. Create a text file called install.cmd and copy in the following information
@echo off
cls
echo --------------------------------------------------------
echo .
echo .           Installing 7-Zip - Please Wait.
echo .         (This window will close once installed)
echo .

REM Silent install 7-Zip for 64-bit
if defined ProgramFiles(x86) "%~dp07z1900-x64.msi" /q"
if defined ProgramFiles(x86) exit

REM Silent install 7-Zip for 32-bit
"%~dp07z1900.msi" /q"
  1. Copy the two exe install files and install.cmd to your software package share
  2. You can now create your SCCM package or deploy the software by using install.cmd

For more information on creating SCCM packages see distribute software using SCCM.

For more information on silent installs with 7-Zip see http://www.7-zip.org/faq.html