SELECT
    P1.`ParentID`,
    P1.`URLLabel`,
    P2.`URLLabel`,
    IF(P1.`URLLabel` <> '', CONCAT(P1.`URLLabel`, '/', P2.`URLLabel`), P2.`URLLabel`) AS `URL`
FROM
    `pages` P2
    LEFT JOIN `pages` P1 ON
        P2.`ParentID` > 1 AND -- INFO: exclude index
        P1.`ID` = P2.`ParentID` AND
        P1.`Language` = P2.`Language` AND
        P1.`Visible` = P2.`Visible`
WHERE
    P2.`Language` = 'bg' AND
    P2.`Module` = 'events' AND
    P2.`Visible` = 1
LIMIT 1

-- TODO: test with 'terms'
