Created
January 10, 2013 17:57
-
-
Save natecavanaugh/4504271 to your computer and use it in GitHub Desktop.
Create a ton of pages
This file contains hidden or 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 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