This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:EntryJSONTableItems> | |
<mt:IfEntryJSONTableItem key=“foo"> | |
<mt:EntryJSONTableItem key=“foo”> | |
</mt:IfEntryJSONTableItem> | |
<mt:Else> | |
do something when items is empty | |
</mt:EntryJSONTableItems> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>MTDDC</title> | |
<style type="text/css"> | |
#result-container { | |
position: relative; | |
} | |
#result-img { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright (c) Tomohiro Okuwaki. http://www.tinybeans.net/blog/ | |
use strict; | |
use warnings; | |
use utf8; | |
# 複数のファイルの操作 | |
my $dir = shift; | |
my $files = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<$MTSetVar name="nest_count" value="0"$><MTParentCategories><$MTSetVar name="nest_count" op="++"$></MTParentCategories><MTIf name="nest_count" gt="2">service/list_<$MTCategoryBasename$>.html<MTElse>_index.html</MTElse></MTIf> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
次のように書きたいとする。 | |
$.MTAppFieldSort({sort: 'title,excerpt,text,ext-field,keywords,tags'}); | |
【対処方法】 | |
text-fieldの手前を$.MTAppFieldSort()でソートして、後はtext-fieldにafter()していく。 | |
(1) シンプルに書く | |
$.MTAppFieldSort({sort: 'title,excerpt'}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (mtappVars.screen_id === 'edit-page') { | |
$.MTAppInCats({ | |
categories: '3', // ←フォルダIDをカンマ区切りで設定 | |
code: function(){ | |
alert('Have a good day!'); // 処理内容を指定($.MTAppCustomize()などなど) | |
} | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mt:DynamicMTML> | |
<mt:CampaignRandom tag="main_visual"> | |
<mt:CampaignAsset> | |
<p class="image"><img src="<$mt:AssetURL$>" alt="<$mt:AssetLabel$>" width="<$mt:AssetProperty property="image_width"$>" height="<$mt:AssetProperty property="image_height"$>" /></p> | |
</mt:CampaignAsset> | |
</mt:CampaignRandom> | |
</mt:DynamicMTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
【設定ファイル】 | |
[product_image] | |
fieldname = 商品画像 | |
type = imagefield | |
class = post page | |
【テンプレート】 | |
<?php | |
$imagefield = get_imagefield('product_image'); | |
$image_id = $imagefield['id']; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function ($) { | |
$('#search').flexibleSearch({ | |
searchFormCreation: false, | |
searchDataPath: { | |
search_A: "/flexibleSearch/search.json", | |
search_B: "/flexibleSearch/search2.json", | |
}, | |
searchFormAction: "/flexibleSearch/search.html", | |
loadingImgPath: "/flexibleSearch/loading.gif", | |
resultItemTmpl: [ |