Welcome Guest, Not a member yet? Register   Sign In
CMS - parse a gallery from view, from database-stored content?
#2

[eluser]charlie spider[/eluser]
i do something similiar in my cms, but i have the page content stored in it's own table which allows multiple content blocks per page (think: main content vs sidebars vs. headers, footers, etc) when you access a page, the content blocks for just that page are retreived and then parsed for the appropriate media tag from within the controller. works fine and isn't that slow.

the "appropriate media tag" is the name that the admin gave to the media file when they uploaded it in the cms. They simply add {filename} anywhere within their content to have the media and all of it's formatting appear there. In your case, you would have to have them do the following:

1) upload individual media files and store file info in db
2) create a gallery name and store name in db
3) add individual media files to that gallery and store the associations in the db

this way you can know the gallery names and their associated files from within your controller.

then, just like my system, have them enter {gallery name} into their content and BAM >>> the gallery automagically appears

you could build the table as a view (return as binary) and pass the appropriate data to it, then pass everything to your main view for display. another highly recommended thing is to use multiple sortable lists in the admin section for when they add files to their gallery. this gives them simple drag and drop capabilities. very user friendly.

i don't know if i answered any questions for you, but i hope that helps


Messages In This Thread
CMS - parse a gallery from view, from database-stored content? - by El Forum - 08-30-2009, 04:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB