Skip to content

Instantly share code, notes, and snippets.

<?php
/*
* WP Import, Ver 2015.01.04
* (C) 2015 by ZoRg Soft
* MODx Notes - WP Import модуь для импорта записей из Wordpress
* http://agarkov.org/modx-x/evo-wpimport
*/
$theme = $modx->config['manager_theme'];
$basePath = $modx->config['base_path'];
@Tramp1357
Tramp1357 / breadcrumbs.class.php
Last active November 17, 2015 09:50
breadcrumbs на процессоре для MODX
<?php
class modSiteWebBreadcrumbsProcessor extends modProcessor{
public function initialize(){
$this->setDefaultProperties(array(
'startId' => 0,
'excludeDocs' => array(),
'showHidden' => true,
'showUnpub' => false,
// $r - объект категории
$res=$r->getMany('Goods'); //получаем товары категории
foreach($res as $r){
$options=[
'class_key'=>'ShopmodxResourceProduct',
'parent'=>$n,
'pagetitle'=>$r->get('name'),
'published'=>1,
'template'=>3,