public function onSiteClone(SiteCloneEvent $event)
    {
        $source = $event->getTemplateSite();
        $target = $event->getSite();

        // First copy node layouts
        $this
            ->database
            ->query(
                "
                INSERT INTO {layout} (site_id, nid, region)
                SELECT
                    :target, usn.nid, ul.region
                FROM {layout} ul
                JOIN {ucms_site_node} usn ON
                    ul.nid = usn.nid
                    AND usn.site_id = :target
                WHERE
                    ul.site_id = :source
                    AND NOT EXISTS (
                        SELECT 1
                        FROM {layout} s_ul
                        WHERE
                            s_ul.nid = ul.nid
                            AND s_ul.site_id = :target3
                    )
            ",
                [
                    ':target'  => $target->getId(),
                    ':target2' => $target->getId(),
                    ':source'  => $source->getId(),
                    ':target3' => $target->getId(),
                ]
            )
        ;

        // Then duplicate layout data
        $this
            ->database
            ->query(
                "
                INSERT INTO {layout_data}
                    (layout_id, item_type, item_id, style, position, options)
                SELECT
                    target_ul.id,
                    uld.item_type,
                    uld.item_id,
                    uld.style,
                    uld.position,
                    uld.options
                FROM {layout} source_ul
                JOIN {layout_data} uld ON
                    source_ul.id = uld.layout_id
                    AND source_ul.site_id = :source
                JOIN {node} n ON n.nid = uld.nid
                JOIN {layout} target_ul ON
                    target_ul.nid = source_ul.nid
                    AND target_ul.site_id = :target
                WHERE
                    (n.status = 1 OR n.is_global = 0)
            ",
                [
                    ':source' => $source->getId(),
                    ':target' => $target->getId(),
                ]
            )
        ;
    }