CodeIgniter Forums
Dinamic content for Page static in codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7)
+--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13)
+--- Thread: Dinamic content for Page static in codeigniter (/showthread.php?tid=63613)



Dinamic content for Page static in codeigniter - ugy.astro - 11-19-2015

Hi,

I have built a website with codeigniter framework. All run and work as i need. But i have a problem, especially about page static. For example, i have 5 files with different format. I want to make that's content dynamically change by my admin panel, in other words all content of these page static are saved in database. I think the right way is using template engine. So, my question is How the database or tables structure of page static if the page static have different format?

Need an advice please, Thks...


RE: Dinamic content for Page static in codeigniter - PaulD - 11-21-2015

How you make a page content to be editable by an admin depends entirely on exactly the nature of the content and the type of admin you are referring to.

Usually, you would have an admin screen where they can update the content. (This may be a simple text field, a WYSIWYG editor of some sort or anything more complex too).

This content is saved to a database with whatever security around that you choose.

When the page controller is called, it reads the content on the database, and uses that content as a variable for the page.

Whether you use a template engine or not is again an entirely separate issue, dependent on your needs, but you can just pass the content to a normal view in the normal way.

Hope that helps,

Paul.


RE: Dinamic content for Page static in codeigniter - ugy.astro - 11-23-2015

(11-21-2015, 09:20 AM)PaulD Wrote: How you make a page content to be editable by an admin depends entirely on exactly the nature of the content and the type of admin you are referring to.

Usually, you would have an admin screen where they can update the content. (This may be a simple text field, a WYSIWYG editor of some sort or anything more complex too).

This content is saved to a database with whatever security around that you choose.

When the page controller is called, it reads the content on the database, and uses that content as a variable for the page.

Whether you use a template engine or not is again an entirely separate issue, dependent on your needs, but you can just pass the content to a normal view in the normal way.

Hope that helps,

Paul.

Hi Paul, thank's for your answer. Still need your opinion

For now, i make a page content to be editable by an admin with a WYSIWYG editor, that content saved in one column, i use two templates engine.

I mind, about "different format" on my questions are HTML and CSS format, each static page have different format, some many have two rows, some many have three rows and also one row. Each of static page which i have using bootstrap framework, so hope it can be automatically responsive, i confused about how to manage my static page with different format(HTML & CSS) in one column.

For alternative, i save my html and css in to my table(especially in one column) with a WYSIWYG editor(tinymce), tab source code.

Or, If you have a better method please give your advice, thank's...