All Downloads are FREE. Search and download functionalities are using the official Maven repository.

lib.xp.examples.content.archive.js Maven / Gradle / Ivy

The newest version!
var contentLib = require('/lib/xp/content');
var assert = require('/lib/xp/testing');

/* global log*/

// BEGIN
// Archive content by path.
var result1 = contentLib.archive({
    content: '/path/to/mycontent',
});

log.info('Archived content ids: ' + result1.join(''));

// END

// BEGIN
// Archive content by id.
var result2 = contentLib.archive({
    content: 'my-content-id'
});

log.info('Archived content ids: ' + result2.join(','));
// END


assert.assertEquals('my-content-id', result2[0]);





© 2015 - 2024 Weber Informatics LLC | Privacy Policy