{ФОТО=Название фотографии}
Есть такой в природе? )
function ShopLink($shop_title){ $shop_title = cmsCore::strClear($shop_title); $shop = cmsDatabase::getInstance()->get_fields('cms_shop_items', "id = '{$shop_title}'", 'id, seolink, title, price'); if($shop){ $imgf = (file_exists($_SERVER['DOCUMENT_ROOT'].'/images/photos/medium/shop'.$shop['id'].'.jpg')) ? 'shop'.$shop['id'].'.jpg' : 'shop_default.jpg'; $link = '<div class="col-md-6 col-sm-6 col-xs-12"><div class="featured-slider sidebarslider"> <ul class="featured-list clearfix"> <li> <div class="featured-product clearfix" style="border: solid 1px #EBFBFD;border-bottom: none;"> <figure style="margin: 0px !important;width: 125px;"> <img src="/images/photos/medium/'.$imgf.'" border="0" style="width: auto !important;max-height: 120px;margin: 0 auto;" alt="'.htmlspecialchars($shop['title']).'" /> </figure> <h5><a href="/shop/'.$shop['seolink'].'.html" title="'.htmlspecialchars($shop['title']).'">'.$shop['title'].'</a></h5> <br /> <div class="featured-price" style="text-align: right;padding-right: 10px;">'.$shop['price'].' руб. | <a href="javascript:$(\'#form'.$shop['id'].'\').submit();" class="add-basket" title="Добавить в корзину" rel="'.$shop['id'].'"><i class="fa fa-shopping-cart"></i> В корзину</a></div> <hr /></div></tr></ul></div></div>'; } else { $link = ""; } return $link;}
в статье вставляется {ШОП=идтовара}