-
-
Save benclark/3763079 to your computer and use it in GitHub Desktop.
Drupal: Create a nodequeue if it doesn't exist already
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
drupal_load('module', 'nodequeue'); | |
// Homepage Features | |
$queue = nodequeue_load_queue_by_name('homepage_features'); | |
if (empty($queue)) { | |
$queue = new stdClass(); | |
$queue->title = 'Homepage Features'; | |
$queue->name = 'homepage_features'; | |
$queue->size = 4; | |
$queue->owner = 'nodequeue'; | |
$queue->types = array('homepage_feature'); | |
$queue->reverse = $queue->count = $queue->i18n = $queue->reference = 0; | |
$queue->subqueue_title = $queue->link = $queue->link_remove = ''; | |
$queue->new = $queue->show_in_tab = $queue->show_in_ui = TRUE; | |
$queue->show_in_links = FALSE; | |
$queue->roles = $queue->subqueues = array(); | |
$queue->add_subqueue = array( | |
'Homepage Features', | |
); | |
nodequeue_save($queue); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment