Welcome Guest, Not a member yet? Register   Sign In
Vue like components in PHP/Codeigniter 4
#1

Hi All, 

Starting up a new CI4 project just coming out of a Vue and wordpress site, in vue i can use components in wordpress i can use blocks that gets passed in user fields which i can react too in my frontend. 

I think it would be nice if i could create the same kind of reuseable components in CI4. 
Imagine i have a view file that displays an image + text block. 
Would it be possible to pass params to the view file i can then catch in the corresponding file, Ideally it would look like this : 

PHP Code:
// About page
<?php echo view('parts/header'); ?>

<?php echo view('component/img_text', {fliptrue})); ?>
<?php 
echo view('component/text', {bgtealcolumns4})); ?>

<?php echo view('parts/footer'); ?>
Reply


Messages In This Thread
Vue like components in PHP/Codeigniter 4 - by andersdn11 - 10-17-2020, 12:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB