Welcome Guest, Not a member yet? Register   Sign In
how to added a some information in all the pages
#1

[eluser]bhakti.thakkar[/eluser]
hi all,
i have my first project on CI already in its develpment stage. Around 40-50 more or less pages are developed. i forgot to put flash the user who is logged in all the pages. for eg i want to put on top in all the pages "User XYZ is logged in".

now how can i do it easily without touching all the pages?? i am using sessions

million thanks
#2

[eluser]Colin Williams[/eluser]
Echo the session var holding the username in the appropriate spot in your view.
#3

[eluser]bhakti.thakkar[/eluser]
hi Colin,
but that means i will have to open all the view pages. i am looking for some things more quick. is it some miracle which i am expecting ????
#4

[eluser]Colin Williams[/eluser]
Quote:but that means i will have to open all the view pages

Sounds like you have a bad architecture to begin with, and now you are suffering the consequences. Why did you opt for loading a unique view on every page? At the very least you could have included common header and footer files from every view.

And the miracle you are looking for is probably "Find/Replace"
#5

[eluser]bhakti.thakkar[/eluser]
oh yes Colin,
i have a header and footer files which i completely forgot. Million thanks for reminding me that.

<?$this->load->view('header');?>


i will do that.




Theme © iAndrew 2016 - Forum software by © MyBB