Block for Sponsored Listings?

Discussion in 'Subrion CMS Packages Discussions' started by consultiq, Apr 11, 2013.

  1. consultiq

    consultiq New Member

    There doesn't seem to be a block included in the default package for Sponsored Listings?

    I thought I could simply create one, by copying the featured listings tpl file and block, (and changing 'featured' to 'sponsored') but that doesn't seem to be working - I cannot get the block to appear.
  2. Gleb_S.

    Gleb_S. Subrion Designer Staff Member

    Hello!

    You should also insert the code below into packages/directory/includes/blocks.inc.php:

    PHP:

    if ($iaView->blockExists('sponsored_listings'))
    {
        $sql2  = "AND l.`sponsored` != '0' ORDER BY l.`sponsored_start` DESC ";
        $sql2 .= "LIMIT 0, {$limit}";
        $iaView->assign('sponsored_listings', $iaDb->getAll($sql . $sql2));
    }
     
    That should do the trick.

Share This Page