php - Concrete5 - Custom block not editable, or recognized with the editing tool? -


i'm making site conrete5. it's first 1 might add. have made myself couple of custom blocks. named news, teammates , references.

now news , teammates not editable anymore. paste news -blocks sourcecode.

----------- form.php ---------------------  <?php   defined('c5_execute') or die(_("access denied.")); ?>  <?php      $al = loader::helper('concrete/asset_library');      echo $al->file('optional', 'fid', t('valitse kuva'), $bf, $args);  ?>     <div class="form-group">      <?php  echo $form->label('otsikko', t('otsikko'));?>      <?php  echo $form->text('otsikko', $otsikko);?>  </div>  <div class="form-group">      <?php  echo $form->label('teksti', t('teksti'));?>      <?php  echo $form->text('teksti', $teksti); ?>  </div>  <div class="form-group">      <?php  echo $form->label('korkeus', t('korkeus'));?>      <?php  echo $form->select('korkeus', array("108px"=>t("pieni"),"299px"=>t("iso")), $korkeus); ?>  </div>  <div class="form-group">      <?php  echo $form->label('koko', t('leveys'));?>      <?php  echo $form->select('koko', array("col-md-3"=>t("pieni"),"col-md-6"=>t("iso")), $koko); ?>  </div>  <div class="form-group">      <?php  echo $form->label('link', t('linkki'));?>      <?php  echo $form->text('link', $link); ?>  </div>  <div class="form-group">      <?php $psh  = loader::helper('form/page_selector');       echo $psh->selectpage('targetcid', $targetcid); ?>  </div>  ----------- view.php ---------------------      <?php       defined('c5_execute') or die(_("access denied."));   	      $c = page::getcurrentpage();      if($size=="col-md-3"){  		$class='col-md-3';          $tag  = $class;  	}else{  		$class="col-md-6";	          $tag= $class;  	}  	if ($c->iseditmode()){  		$class="editmode";  		$editingstyle="padding: 15px; background: #ccc; color: #444; border: 1px solid #999;";  	}  	else {    		$editingstyle = "";  	}      $random = rand();      if($korkeus == "299px"){          $padding = '4px';      }else {          $padding = '5px';      }        $p = page::getbyid($targetcid);        $a = new globalarea('header navigation');        $blocks = $a->getareablocksarray($c);        foreach ($blocks $block){           if ($block->getblocktypehandle()=="autonav"){              $block->setcustomtemplate('cdrop.php'); // it's templates/cdrop.php -check select option values when set custom template manually @ edit mode. think need "my_template"               $bv = new blockview($block);              $bv->render('view');           }        }  ?>  <?php $p = page::getbyid($targetcid); ?>    <a href="index.php">      <div class="pull-left <?= $koko;?>" style="padding:<?= $padding ?>;<?php echo $editingstyle;?>">          <div class="col-lg-12 alapalkki box" style="z-index:2;position:relative;">              <div class="image-big" style="background-color:transparent;text-align:center;position:relative;z-index:1;">               <!-- figure shit out......... !-->                  <?php                  if($fid != 0){              $file = file::getbyid($fid);              $filepath = $file->getversion()->getrelativepath();              }              ?>              <?php echo '<img src="' . $filepath . '" style="max-height:' .  $korkeus . ';width:100%;"/>'; ?>                        </div>              <div class="col-lg-12 " style="position:relative;z-index:255;padding:2px 0 0 15px;">                  <div class="htitle">                      <h4 style="color:white;"><b><?php echo $otsikko; ?></b></h4>                      <p style="color:white;"><?php echo $teksti; ?></p>                  </div>              </div>          </div>      </div>  </a>

why not being editable block? why doesn't concrete5 recognize existence when on page? says @ area it's empty.

$p = page::getbyid($targetcid);       $a = new globalarea('header navigation');       $blocks = $a->getareablocksarray($c);       foreach ($blocks $block){          if ($block->getblocktypehandle()=="autonav"){             $block->setcustomtemplate('cdrop.php'); // it's templates/cdrop.php -check select option values when set custom template manually @ edit mode. think need "my_template"              $bv = new blockview($block);             $bv->render('view');          }       } ?> 

there's problem. no idea ever doing there..... removed it. worked charm.

-kevin


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -