Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function CmsLink($id,$is_device = null) {
- $storeId = $this->_storeManager->getStore()->getId();
- $blockData = $this->_pageFactory->setStoreId($storeId)->load($id);
- $link = $this->_storeManager->getStore()->getBaseUrl().$blockData->getIdentifier();
- $html = "";
- $items_show = intval($this->getItemShow());
- if(intval($items_show) < $item)
- $read_more = ' readmore';
- else
- $read_more = '';
- if($is_device == 'mobile') {
- $html ='<li><a href="'.$link.'"><span class="name'.$item.$read_more.'">'.$blockData->getTitle().'</span></a></li>';
- } else {
- $html ='<div class="pt_menu nav-'.$item.$read_more.'" id="pt_cms">
- <div class="parentMenu"><a href="'.$link.'"><span>'.$blockData->getTitle().'</span></a></div>
- </div>';
- }
- return $html;
- }
Add Comment
Please, Sign In to add comment