td_module_77

Posted in: Newspaper
Post count: 9

Hi i write my costum mobule as below. I need to index number for loop. How do i get index number. how to find more option for usin this api

class td_module_77 extends td_module {

function __construct($post) {
//run the parrent constructor
parent::__construct($post);
}

function render() {
ob_start();
$count = 0;
?>

<div class=”<?php echo $this->get_module_classes();?>”>
<div class=”td-module-image”>
<?php echo $this->get_image(‘td_324x160’);?>
<?php if (td_util::get_option(‘tds_category_module_1’) == ‘yes’) { echo $this->get_category(); }?>
</div>
<?php echo $this->get_title();?>

<div class=”td-module-meta-info”>
<?php echo $count;?>
<?php echo $this->get_author();?>
<?php echo $this->get_date();?>
<?php echo $this->get_comments();?>
</div>

<?php echo $this->get_quotes_on_blocks(); ?>

</div>

<?php $count++;return ob_get_clean();
}
}

Post count: 9

hi, in rd_block_77.php i found a foreach loop code. line 42 “$td_post_count = 0; // the number of posts rendered”. i add this $buffy .= $td_post_count; cumber came in loops.

But i want to add this index number like blow

<div class=”td-module-meta-info”>
<?php $td_post_count;?>
<?php echo $this->get_author();?>
<?php echo $this->get_date();?>
<?php echo $this->get_comments();?>
</div>

Post count: 22421

Hello,

Sorry but the theme api is not covered by the themesupport as it represents customization. If you cannot follow along with the api documentation here: https://forum.tagdiv.com/td_api_moduleadd/ then you will have to get help from a developer or freelancer as we cannot offer any customization service.

Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.