Welcome Guest, Not a member yet? Register   Sign In
Creating New Pages On The Fly
#1

[eluser]Chris.Campbell[/eluser]
I am basically new to php but I can get around. And I am also new to CI. I don't really understand the idea of creating pages on the fly. Say I want the option to create a gallery. How would I be able to have the option of entering the name of the new gallery plus some settings and then a link would be created on the main page to the gallery. Please, any help is much appreciated. Links to tutorials etc. Thank you!
#2

[eluser]sophistry[/eluser]
CI's official video tutorials linked off the home page?
#3

[eluser]Chris.Campbell[/eluser]
Those don't show what I described. =)
#4

[eluser]sophistry[/eluser]
Right. You are meant to learn from them and extrapolate.
#5

[eluser]Chris.Campbell[/eluser]
Yeah of course, I have followed those tutorials and learned from them, however they don't touch on anything I am looking for help with. Except maybe the URI segments part.
#6

[eluser]sophistry[/eluser]
[quote author="Chris.Campbell" date="1185339760"] How would I be able to have the option of entering the name of the new gallery plus some settings and then a link would be created on the main page to the gallery.[/quote]

Ok. It sounds like you need to enter data in a form field and have it "do something." Is that right?
#7

[eluser]Chris.Campbell[/eluser]
Yep. I was thinking there would be a form. When you submit the form the data will get passed in an variable to the action page. Then that page would use the data contained in that array to basically create a new page and a link say on the homepage to that page. That part I do not understand how to do.
#8

[eluser]sophistry[/eluser]
You need a database that will keep track of the items you wish to be able to create.

See this post on a similar topic - creating a CMS.

It has several approaches but the basic one is to create a table "pages" (for instance) and then get CI to route the requests to a pages controller that then queries the database and spits out the content.

Data is added to the database through another controller via your forms.




Theme © iAndrew 2016 - Forum software by © MyBB