<a href="<?php echo $this->url(array('key' => $entry->getUrlPath()), 'blog-show', false, false); ?> " ><?php echo $entry->getTitle(); ?> </a> </h4> <small><?php echo $entry->getDate()->toString('FFFFF'); ?> </small> <p> <?php echo trim($entry->getSummary()) ? $entry->getSummary() : Website_Tool_Text::cutStringRespectingWhitespace(trim(strip_tags($entry->getContent())), 200); ?> </p> </blockquote> <?php } ?> </div> <?php if ($this->editmode) { ?> </div> <?php } ?>
<div class="image"> <a href="<?php echo $link; ?> "><img src="<?php echo $this->product->getFirstImageAsset('productList'); ?> " alt=""></a> </div> <div class="details fixclear"> <h3><?php echo $this->product->getOsName(); ?> </h3> <p class="desc"><?php echo Website_Tool_Text::cutStringRespectingWhitespace(strip_tags($this->product->getDescription()), 70); ?> </p> <div class="actions"> <a href="<?php echo $this->view->url(array('action' => 'add', 'item' => $linkProduct->getId()), 'cart'); ?> " class="add-to-cart"><?php echo $this->translate("shop.addtocart"); ?> </a> <a href="<?php echo $link; ?> "><?php echo $this->translate("shop.moreinfo");
/** * @param string $format * @return Zend_Feed_Abstract */ public function getFeed($format = 'rss') { if ($format != 'rss' && $format != 'atom') { throw new Zend_Controller_Action_Exception("Feed type {$format} is not supported"); } $url = new Pimcore_View_Helper_Url(); $host = 'http://' . $_SERVER['HTTP_HOST']; $feed = array('title' => '', 'copyright' => '', 'link' => $host . 'plugin/Blog/entry/feed/format/' . $format, 'charset' => 'utf-8', 'language' => 'pl-pl', 'lastUpdate' => time(), 'published' => time(), 'entries' => array()); if ($this->_options->feed) { $feed = array_merge($feed, $this->_options->feed->toArray()); } foreach ($this->getList() as $entry) { $entry instanceof Object_BlogEntry; $feed['entries'][] = array('title' => $entry->getTitle(), 'link' => $host . $url->url(array('key' => $entry->getKey()), 'blog-show'), 'description' => trim($entry->getSummary()) ? $entry->getSummary() : Website_Tool_Text::cutStringRespectingWhitespace(trim(strip_tags($entry->getContent())), 200), 'lastUpdate' => $entry->getDate()->getTimestamp()); if ($entry->getModificationDate() < $feed['lastUpdate']) { $feed['lastUpdate'] = $feed['published'] = $entry->getModificationDate(); } } return Zend_Feed::importArray($feed, $format); }
public function getAction() { $question = Poll_Question::getById((int) $this->_getParam('id')); $pollData = array('responses' => $question->sumResponses()); $allowedKeys = array('id', 'title', 'startDate', 'endDate', 'isActive', 'multiple', 'answers'); foreach (get_object_vars($question) as $key => $value) { if (in_array($key, $allowedKeys)) { $value = $question->getValue($key); if ($value instanceof Iterator) { $value = iterator_to_array($value); } switch ($key) { case 'startDate': case 'endDate': if ($value) { $value = strtotime($value); } break; } $pollData[$key] = $value; } } $pollData['shortTitle'] = Website_Tool_Text::cutStringRespectingWhitespace($question->getTitle(), 16); $this->_helper->json($pollData); }