[[*template:is=`4`:then=`<link rel="stylesheet" href="template/css/blog.css">`]]
<div id="pdopage">
<div class="rows">
[[!pdoPage?
&elementClass=`modSnippet`
&element=`pdoResources`
&tpl=`newscategoryTpl`
&includeContent=`1`
&includeTVs=`image`
&processTVs=`1`
&hideContainers=`1`
&sortby=`menuindex`
&sortdir=`ASC`
&showHidden=`1`
&parents=`4`
&depth=`1`
&ajaxMode=`scroll`
&limit=`5`
]]
</div>
[[!+page.nav]]
</div>
[[*stock:gte=`1`:then=`в наличии`:else=`под заказ`]]
var accessToken = 'получаете токен и в полет! тут http://instagram.pixelunion.net/';
$.getJSON('https://api.instagram.com/v1/users/self/media/recent/?access_token='+accessToken+'&callback=?',function (insta) {
$.each(insta.data,function (photos,src) {
if ( src.caption == null){ src.caption = 'no caption'};
if ( photos === количество ) { return false; }
$('<a href="'+src.link+'" target="_blank" class="post">'+
'<img src="'+ src.images.standard_resolution.url + '";"></div>').appendTo('.класс контейнера куда выводить');
});
$res = $modx->getObject('modResource', 137);
# Snippet to include files from filesystem
# [[includeFile? &file=`assets/templates/mytemplate/file.html`]]
if ( !isset($file) || $file== "" ) return "No file specified."; //check if there's a file given.
//Start the buffer
ob_start();
//include
include $file;
//get contents from the buffer
$ob_contents = ob_get_contents();
//and kill/delete the buffer
ob_end_clean();
//return it to MODx
return $ob_contents;