如何添加聊天按钮或任何将显示在代码点火器3应用程序的所有页面上的按钮



在codeigniter 3文件结构中找不到根index.html文件。我想显示一个聊天按钮,它应该在所有页面上都可见。

我必须查找哪个文件?

按钮显示在所有页面上,但它就在标题后面,我想它与正文无关

这是Template.php文件,它包装了应用程序-

<body style='position:relative,z-index:10'>

<?php $this->load->view('website/layout/header'); ?> 

<?php $this->load->view('website/layout/whatsapp_button');?>
<?php $this->load->view('website/'.$content);?>

</div> 
<?php $this->load->view('website/layout/footer'); ?>
</body>

whatsapp_button.php

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1" 
name="viewport" />
<meta name="description" content="" />
<meta name="author" content="" />

</head>
<body>
<!-- start header -->
<div className=''>
<a style='position:absolute,font-size:20px,z- 
index:100,top:500px' 
target='_blank' 
href='https://api.whatsapp.com/send?phone='>
Chat
</a>
</div>
</body>
</html>

没有这样的文件。视图(您的html输出(从控制器加载

控制器索引函数(或加载html输出的任何位置(中的典型结构可能是:

$this->load->view('header', $data);
$this->load->view('content');
$this->load->view('footer');

例如,页眉可以容纳菜单的页脚和所有脚本

把你的按钮放在其中一个,因为你会加载页眉和页脚总是

更多:加载Codeigniter 3页

最新更新