#set($leadImageMaxWidth = 400)
#set($leadImageMaxHeight = 300)
#set($leadImgStyle='style="border:1px solid #000; padding: 0px;"')
#foreach($item in $cms.links("/sports/redsox",1,1))
#set($myImage = "")
$cms.template("Get Main Image")
#if($mainImage)
#set($newHeight = $mainImage.height)
#set($newWidth = $mainImage.width)
#set($myImage = $util.tag($mainImage,$imgStyle))
##1 $newWidth x $newHeight --
#if($newWidth > $leadImageMaxWidth)
#set($newHeight = $math.round($math.multiply($math.divide($leadImageMaxWidth,$mainImage.width),$mainImage.height)))
#set($myImage = $util.resizeImageTag($mainImage,$leadImageMaxWidth,0,$leadImgStyle))
#end
#if($newHeight > $leadImageMaxHeight)
#set($newWidth = $math.round($math.multiply($math.divide($leadImageMaxHeight,$mainImage.height),$mainImage.width)))
#set($myImage = $util.resizeImageTag($mainImage,0,$leadImageMaxHeight,$imgStyle))
#end
$myImage
#end
#end
Featured video
Follow the Red Sox and Sea Dogs on Twitter
Tweets about "from:clearthebases OR "#WorldSeries from:pressherald OR from:pressheraldsports OR from:MikeLowePPH OR from:RedSox OR from:JLester31 OR from:JacobyEllsbury OR from:davidortiz OR from:Ryan_Kalish OR from:Shesta_Sox OR from:MikeNapoli25 OR from:ShaneVictorino OR from:RyanDempsterFDN OR from:b_workman12 OR from:Cardinals OR from:MLBNetwork""Kevin Thomas: Clearing the Bases
-
#foreach($item in $cms.links("/blogs/thomas",1,5))
-
$item.title
#set($cssInputString = $item.summary) #set($cssNumWords = 20) $cms.template("Create Shortened String")
#end
#set($myImage = "")
$cms.template("Get Main Image")
#if($mainImage)
#set($newHeight = $mainImage.height)
#set($newWidth = $mainImage.width)
#set($myImage = $util.tag($mainImage,$imgStyle))
##1 $newWidth x $newHeight --
#if($newWidth > $topImageMaxWidth)
#set($newHeight = $math.round($math.multiply($math.divide($topImageMaxWidth,$mainImage.width),$mainImage.height)))
#set($myImage = $util.resizeImageTag($mainImage,$topImageMaxWidth,0,$topImgStyle))
#end
#if($newHeight > $topImageMaxHeight)
#set($newWidth = $math.round($math.multiply($math.divide($topImageMaxHeight,$mainImage.height),$mainImage.width)))
#set($myImage = $util.resizeImageTag($mainImage,0,$topImageMaxHeight,$imgStyle))
#end
$myImage
#end
#end
$item.title
$item.summary
#set($myImage = "")
$cms.template("Get Main Image")
#if($mainImage)
#set($newHeight = $mainImage.height)
#set($newWidth = $mainImage.width)
#set($myImage = $util.tag($mainImage,$imgStyle))
##1 $newWidth x $newHeight --
#if($newWidth > $imageMaxWidth)
#set($newHeight = $math.round($math.multiply($math.divide($imageMaxWidth,$mainImage.width),$mainImage.height)))
#set($myImage = $util.resizeImageTag($mainImage,$imageMaxWidth,0,$imgStyle))
##2 $newWidth x $newHeight --
#end
#if($newHeight > $imageMaxHeight)
#set($newWidth = $math.round($math.multiply($math.divide($imageMaxHeight,$mainImage.height),$mainImage.width)))
#set($myImage = $util.resizeImageTag($mainImage,0,$imageMaxHeight,$imgStyle))
#end
$myImage
#end
#end