Welcome Guest, Not a member yet? Register   Sign In
[answered] How to render cell passing variables to cell view?
#1

(This post was last modified: 04-19-2023, 11:13 AM by Corsari.)

Hello
I have created this cell view in app/Cells

PHP Code:
        <div class="card shadow">
            <div class="card-body text-start">
                <h5 class="card-title"><?= $cardTitle?></h5>
                <p class="card-text"><i class="bi <?= $cardIcon?> mr-3"></i><?= $counter?></p>
                <a href="#" class="btn btn-primary"><?= $btnText?></a>
            </div>
        </div> 


and the respective controller in app/Cells

PHP Code:
<?php

namespace App\Cells;

use 
CodeIgniter\View\Cells\Cell;

class 
SummaryCard1Btn extends Cell
{




I'm reading the guide but I cannot find a suitable manner to pass those variables when it is time to view/render the cell
I'd like to use something like

PHP Code:
<?= view_cell('SummaryCard1Btn::render', (passing here those 4 variables); ?>


Can you kindly help with this?
Thank you
Reply


Messages In This Thread
[answered] How to render cell passing variables to cell view? - by Corsari - 04-19-2023, 09:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB