Skip to content

Instantly share code, notes, and snippets.

@sinkovsky
Created November 18, 2009 09:00
Show Gist options
  • Save sinkovsky/237668 to your computer and use it in GitHub Desktop.
Save sinkovsky/237668 to your computer and use it in GitHub Desktop.
sub _hdlr_entry_body_has_width {
my($ctx, $args, $cond) = @_;
return 0 if ( ! $ctx->stash('entry') );
unless( $args->{'width'} ) {
## tut nado chto-to sdelat s soobsheniem - ono ne sootwetstvuet logike
&MT::log('Unexpected parameter width for tag <MTIfEntryBodyHasWidth>');
return 0;
}
my $entry_text = &MT::Template::Context::_hdlr_entry_body;
( $args->{'width'} <= length($entry_text) ) ? 1 : 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment