getTemplate();$url = JURI::root().'templates/'. $cur_template .'/images/';$i = 0;in footer code: this snippet should go into body code : "> {listEntries.title} could u pls advice how to adjust the if clause?best regardsGabriela"> pagination - Forums

Forums

pagination

chrissy6930 07 Mar, 2015
hi all,

since CF5 does not appear to include pagination any longer I should swap my form from CF5 to CC5:

I do however have probs with swapping the snippet from CF5 to appropriate syntax for body code in CC5

in header code I have:
<?php
$app = JFactory::getApplication();
$breadcrumbs = $app ->getPathway();
$breadcrumbs->addItem(JText::_('ENTIRES'));
?>

<div class="componentheading">
  <?php echo JText::_('MANAGE_ENTREIS'); ?>
</div>

<div class="cf_userpanelview">
  <h3>
    <?php echo JText::_('ENTIRES'); ?>
  </h3>

  <div class="cf_head">
    <input type="button" name="button" value="<?php echo JText::_('ADD_ENTRY'); ?>" class="button"
onclick="javascript:location.href='<?php echo JRoute::_('index.php?option=com_chronoforms5&chronoform=addEntries&Itemid='. JRequest::getInt('Itemid'), false); ?>';" />
  </div>

  <div class="sectiontableheader">
     <div class="cf_hentry">
        <div class="cf_htype">
          <?php echo JText::_(' '); ?>
        </div>
        <div class="cf_htitle">
          <?php echo JText::_('TITLE'); ?>
        </div>
          <div class="cf_hedit"></div>
        <div class="cf_hdelete"></div>
     </div>
  </div>

<?php
$app = JFactory::getApplication();
$cur_template = $app->getTemplate();
$url = JURI::root().'templates/'. $cur_template .'/images/';
$i = 0;


in footer code:
 </div>


this snippet should go into body code :
  <div class="sectiontableentry<?php $i++; echo ($i%2)+1; ?>">
    <div class="cf_eentry">
      <div class="cf_etype">
          <?php if ($detail['type']=='1')  :
          	echo JHTML::_('image', $url.'Lightning.png','');
          elseif ($detail['type']=='2'):
          	echo JHTML::_('image', $url.'Info.png',''); 
         else :
          	echo JHTML::_('image', $url.'Question.png',''); 
          endif; ?>
      </div>
      <div class="cf_etitle">{listEntries.title}</div>
    </div>
  </div>


could u pls advice how to adjust the if clause?

best regards
Gabriela
chrissy6930 11 Mar, 2015
Answer
found it: I need to replace $detail['type'] for 'Model.type'
This topic is locked and no more replies can be posted.