I have created a PHP block using Deanos tools to insert a block showing featured photos.
I want to add a Header above the photos but cannot seem to make an "echo" work.
any ideas
I have created a PHP block using Deanos tools to insert a block showing featured photos. I want to add a Header above the photos but cannot seem to make an "echo" work. any ideas Nigel |
You can being by showing us what code your using in a php block. "Cannot seem to make an "echo" work." does not tell us anything. https://www.deanbassett.com |
Deano,The block has this code in it to show the featured photos: The code I was using to add the line above the photos was Echo "<html>"; Code below works without the above echo $sOutput; $this->oSearch = new BxPhotosSearch(); $this->oSearch->aCurrent['restriction']['featured'] = array( 'field' => 'Featured', 'value' => '', 'operator' => '=', 'paramName' => 'featured' ); $this->oSearch->aConstants['linksTempl']['featured'] = 'browse/featured'; $aCustom = array( 'per_page' => '8', 'menu_bottom_type' => 'featured', 'wrapper_class' => 'result_block' ); $aCode = $this->oSearch->getBrowseBlock(array('featured' => 1, 'allow_view' => $this->aVisible), $aCustom); if ($this->oSearch->aCurrent['paginate']['totalNum'] > 0) return array($aCode['code'], $aCode['menu_top'], $aCode['menu_bottom'], ''); Nigel |
Ah. https://www.deanbassett.com |
So complete modified code. $this->oSearch = new BxPhotosSearch(); $this->oSearch->aCurrent['restriction']['featured'] = array( 'field' => 'Featured', 'value' => '', 'operator' => '=', 'paramName' => 'featured' ); $this->oSearch->aConstants['linksTempl']['featured'] = 'browse/featured'; $aCustom = array( 'per_page' => '8', 'menu_bottom_type' => 'featured', 'wrapper_class' => 'result_block' ); $aCode = $this->oSearch->getBrowseBlock(array('featured' => 1, 'allow_view' => $this->aVisible), $aCustom); if ($this->oSearch->aCurrent['paginate']['totalNum'] > 0) $aCode['code'] = "<div>Impress us with your #Selfie and appear in the Featured Gallery of<b>Me Myself & I</b><div>" . $aCode['code']; return array($aCode['code'], $aCode['menu_top'], $aCode['menu_bottom'], ''); https://www.deanbassett.com |
Thanks Deano, all working Ok. Your help is greatly appreciated Nigel |