-
#set($imageMaxWidth = 380)
#set($imageMaxHeight = 240)
#set($imgStyle='style="border:1px solid #000; padding: 0px; margin: 5px 50px 5px 0px; float: left; z-index: 0;"')
#foreach($item in $cms.links("/business/",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 > $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))
##3 $newWidth x $newHeight --
#end
$myImage
#end
$item.title
Â
$item.summary
#end
Maine Business Blogs
Commercial Confidential
-
#foreach($item in $cms.links("/blogs/commercialconfidential",1,3))
-
$item.title
#end
Social Social
-
#foreach($item in $cms.links("/blogs/socialsocial",1,3))
-
$item.title
#end
Past Headlines
-
#foreach($a in [-1..-7])
#set($day = $util.add($util.now,"day",$a))
#set($dayPath = $util.encode.url($util.date("MMMM d, yyyy",$day,"America/New_York")))
- $util.date("EEEE, MMMM d",$day,"America/New_York") #end
-
#set($smallImageMaxWidth = 220)
#set($smallImageMaxHeight = 220)
#set($imgStyle='style="border:1px solid #000; padding: 0px; z-index: 0;"')
#foreach($item in $cms.links("/business/",2,30))
-
#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 > $smallImageMaxWidth)
#set($newHeight = $math.round($math.multiply($math.divide($smallImageMaxWidth,$mainImage.width),$mainImage.height)))
#set($myImage = $util.resizeImageTag($mainImage,$smallImageMaxWidth,0,$imgStyle))
##2 $newWidth x $newHeight --
#end
#if($newHeight > $smallImageMaxHeight)
#set($newWidth = $math.round($math.multiply($math.divide($smallImageMaxHeight,$mainImage.height),$mainImage.width)))
#set($myImage = $util.resizeImageTag($mainImage,0,$smallImageMaxHeight,$imgStyle))
##3 $newWidth x $newHeight --
#end
$myImage
#end
$item.title
$item.summary
#end