Skip to content

Instantly share code, notes, and snippets.

@natecavanaugh
Created January 10, 2013 17:57
Show Gist options
  • Save natecavanaugh/4504271 to your computer and use it in GitHub Desktop.
Save natecavanaugh/4504271 to your computer and use it in GitHub Desktop.
Create a ton of pages
var createPage = function(index) {
Liferay.Service(
'/layout/add-layout',
{
groupId: 22101,
privateLayout: false,
parentLayoutId: 0,
name: 'Test' + index,
title: 'Test' + index,
description: '',
type: 'portlet',
hidden: false,
friendlyURL: ''
},
function(obj) {
console.log('Created page: Test' + index);
if (index <= 400) {
createPage(++index);
}
}
);
};
createPage(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment