Welcome Guest, Not a member yet? Register   Sign In
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS

[eluser]Turv[/eluser]
Hey,

Wondering if someone could give me some advice on how to approach this...

I have a 3 Column site that has multiple 'Sidebar Items', News, Search, etc etc, each one in their own view. I want to be able to create a page, Select a layout (3 Column, 2 Column, 1 Column etc), and then select from a series of 'sidebar items' to display on that page (In either the left, or right column).

Now, I thought this would be easy until i started actually looking at it. I guess i'd have to store the names of the sidebar items that need to appear on each page in a table row, then loop through them and somehow include them into the layout file, but i'm unsure on what would be to best approach to accomplish this as some would have to perform database queries so i don't know if i'd have to get the content before loading the view file or if i should perform the queries from the view file, calling the model functions.

Wondered if anyone had any ideas that spring to mind?

EDIT: You may also want to take a look at the Admin Pages Module, You can't delete page.

EDIT2: The whole Pages Admin Modules seems to be mesesed up because of the get() function in the pages module, You can't edit the page and things because of the way the get function returns the data

Code:
// How the get() function returns results
Array
(
    [0] => stdClass Object
        (
            [id] => 1
            [slug] => home
            [body] => Welcome to our homepage. We have not quite finished setting up our website just yet, but please add us to your bookmarks and come back soon.
            [title] => Home
            [parent_id] => 0
            [lang] => en
            [updated_on] => 1219336535
        )

)

// How it should return results
stdClass Object
(
    [id] => 1
    [slug] => home
    [body] => Welcome to our homepage. We have not quite finished setting up our website just yet, but please add us to your bookmarks and come back soon.
    [title] => Home
    [parent_id] => 0
    [lang] => en
    [updated_on] => 1219336535
)

You should be able to see what i mean.

Thanks


Messages In This Thread
PyroCMS v0.9.7.4 - an open-source modular general purpose CMS - by El Forum - 09-01-2009, 08:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB