Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Drupal 7 Panels Visibility Rule: Body Content Counts More 1000 Chars
<?php
// Insert in input box without <?php tags
if(isset($contexts['argument_entity_id:node_1']->data->body['und'][0]['value'])){
if(strlen(strip_tags($contexts['argument_entity_id:node_1']->data->body['und'][0]['value'])) > 1000 ) {
return TRUE;
}
else {
return FALSE;
}
}
else {
return FALSE;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment