| Новости | FAQ | Авторы | Документация | В действии | Библиотека |
| Инструменты | Полезные ссылки | Хостинги | Скачать | Примеры | Форум |
DSHa 06.10.2009 15:32
с помощью метода формирую XML код:@lot_product[id_product; iLimit]
$select_lot_product[^oSql.table{select
lot_id, nm_lot, id_product, is_published, lot_txt, price
from
lot
where
id_product IN
(SELECT id_product
from
product
where
is_published = 1
^if(def $id_product){
AND thread_id = $id_product OR id_product = $id_product )
}
ORDER BY
dt_published
}
[
^if(^iLimit.int(0)){
$.limit(^iLimit.int(0))
}
]]
#список лотов XML
<?xml version="1.0" encoding="utf-8" ?>
<lot>
<title></title>
<body>
^select_lot_product.menu{
<title_lot>$select_lot_product.nm_lot</title_lot>
<description>$select_lot_product.lot_txt</description>
<price>$select_lot_product.price</price>
<Contacts>Контакты</Contacts>
<links>
<link href="/birja/id_lot.htm?id_lot=$select_lot_product.lot_id">Подробнее...</link>
</links>
}
</body>
</lot>
#end @lot_product[]В примере из документации XML считываеться из файла