Welcome Guest, Not a member yet? Register   Sign In
how to get meta description dynamically
#1

hi

I was searching a lot but still not fortunate. can anyone tell me how to update meta description in layout method in CI4?
Reply
#2

I would say like any other data..
Reply
#3

(12-10-2020, 07:58 AM)cybersven Wrote: I would say like any other data..
 do you know how to do?
Reply
#4

PHP Code:
$data['description'] = "Your description"
in your controller

then in your layout :
PHP Code:
<meta name="description" content="<?=$description?>" /> 
Reply
#5

(12-10-2020, 08:30 AM)cybersven Wrote:
PHP Code:
$data['description'] = "Your description"
in your controller

then in your layout :
PHP Code:
<meta name="description" content="<?=$description?>" /> 

Thank you so much.
Appreciate. 
Will try and let you know..
Reply
#6

(12-10-2020, 08:30 AM)cybersven Wrote:
PHP Code:
$data['description'] = "Your description"
in your controller

then in your layout :
PHP Code:
<meta name="description" content="<?=$description?>" /> 
Hi,

thank you so much. Appreciate.

i love you man. really happy.

do you do online teaching? so I can hire you to learn CI4
Reply




Theme © iAndrew 2016 - Forum software by © MyBB