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
{ | |
xtype: "textfield" | |
,fieldLabel: "Name of Sloth" | |
,name: "name" | |
,required: true | |
} |
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
var form = new Ext.form.FormPanel({ | |
layout: 'form' | |
,title: "Sloth in a box ltd. <em>Sloth Inventory Management System 2.0</em>" | |
,labelWidth: 200 | |
,labelPad: 20 | |
,labelAlign: 'right' | |
,bodyStyle: { | |
padding: '20px 0' | |
} | |
,items: [ |
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
Ext.onReady(function(){ | |
var helloWorld = new Ext.form.Label({ | |
text: 'Pick a country to say Hello to!' | |
,renderTo: 'page' | |
}); | |
var dropdown = new Ext.form.ComboBox({ | |
store: new Ext.data.ArrayStore({ | |
id: 0, | |
fields: [ |
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
Ext.onReady(function(){ | |
var helloWorldHongKongStyle = new Ext.form.Label({ | |
text: 'Ni Hao Shi Jie!' | |
,renderTo: 'page' | |
}); | |
}); |
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
$(document).ready(function(){ | |
$('#page').text("Ni Hao Shi Jie!"); | |
}); | |
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
var element = document.getElementById('page'); | |
element.innerHTML = 'Ni Hao Shi Jie!'; |
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> | |
<head> | |
</head> | |
<body> | |
<div id="page"></div> | |
</body> |
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
<?php | |
/* | |
Call it like this: | |
[[getResourceAsPlaceholder? | |
&id=`10` | |
&prefix=`doc.` | |
&separator=`.` |
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
# MODX supports Friendly URLs via this .htaccess file. You must serve web | |
# pages via Apache with mod_rewrite to use this functionality, and you must | |
# change the file name from ht.access to .htaccess. | |
# | |
# Make sure RewriteBase points to the directory where you installed MODX. | |
# E.g., "/modx" if your installation is in a "modx" subdirectory. | |
# | |
# You may choose to make your URLs non-case-sensitive by adding a NC directive | |
# to your rule: RewriteRule ^(.*)$ index.php?q=$1 [L,QSA,NC] |
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
$tv = $modx->getObject('modTemplateVar', array('name' => 'hitcount')); | |
$criteria = array( | |
'tmplvarid' => $tv->get('id'), | |
'contentid' => $modx->resourceIdentifier | |
); | |
if(!$tvResource = $modx->getObject('modTemplateVarResource', $criteria)){ | |
$tvResource = $modx->newObject('modTemplateVarResource'); | |
$tvResource->set('value', 1); |
NewerOlder