CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Multiple include pages...

Print topic Send  topic

Author Message
songohan

Posts: 89
Posted: 07/22/2007, 7:46 AM

I'm trying to generate flexible CMS with multiple content types (article, image gallery etc..). Each content type would have it's own table in database and includable page to display data.

Also, I'd like to be able to display different content types on same page. For instance on some page I would like to display:
1) Article
2) Image gallery
3) Article
4) Article

Only way I see to achieve this is to have Page_Items table where I would store data to be displayed on certain page. Based on that I would include page for rendering Article, than page to render Gallery, than two more times page to render Article.

It all seems fine in theory :-) but I'm a bit stuck on how to actualy do it...

Does anyone have idea how to include pages in this way and pass them data for WHERE clause??

Is there other way to do this? Is it possible to do something like this with CCS ot it is beyond scope?? Any suggestions are wellcome! I think we would all benefit from solution like this...

Best regards,

Andrej
View profile  Send private message
tonyk

Posts: 163
Posted: 07/22/2007, 4:55 PM

If your articles, images etc are designed only to be available on one page rather than available to several pages you could include a page designator within the record for the article or iamge.

if no articles are found with the appropriate designator for the page then hide the control.

If you needed articles available on different pages then you would need a resource file indicating articles / images etc available for the page, you could interrogate this to see whether the controls should be visible.

Tony
View profile  Send private message
songohan

Posts: 89
Posted: 07/23/2007, 12:00 AM

Thnx for replay!

I use similar method on other projects, but it does not give me flexibility I was hoping for. As each content type requires different kind of table in database and different kind of RecordForm do display it, it is not possible to mix ordering.

To display for instance all articles, one after another, than all image galleries is no problem, but to display Article, Image gallery, Article would require to include pages before show and I can't find way to do it. Seems I would need to include page on BeforeShow event, when I know what items I have on a page and in which order they are to be displayed.

Any suggestions?

Andrej
View profile  Send private message
songohan

Posts: 89
Posted: 07/24/2007, 7:13 AM

Huh, no ideas? Anyone?

Andrej
View profile  Send private message
tonyk

Posts: 163
Posted: 08/03/2007, 1:34 PM

OK
Assume you have a display grid.
The grid row contains an instance of each type of display control you wish to use.
From your query (combining the tables into a row) render visible or invisible the display controls you wish to use according to a test of the display control value, you may have to use is_set for null values from your query. You may need to access the row_number to switch a controls visibility though probably not..
Each row would then contain any combination of the display controls.
The tests should be done in before show row. You could scrap the table structure and use conditionally displayed labels containing custom DIVs to control placement, you would definitely need the row number to do that. (The labels are set to display HTML).
Hope it makes sense and gives you some ideas.
Tony
p.s. using labels that can be forced to contain HTML is a technique I have found extremely useful as you are able to add whatever HTML you wish to the page at runtime.
View profile  Send private message
songohan

Posts: 89
Posted: 08/07/2007, 7:17 AM

Thnx

Quote :
he grid row contains an instance of each type of display control you wish to use.

Well, problem is you can't have grid inside grid if I got you right..

But using labels containing HTML + custom coding to retrieve data from right table in database could work. Same as CCDLookUpTreeToUL function from Examples. Thnx Tony!

Was there ever a fix for this? Is so how can one fix this not to do: http://forums.yessoftware.com/posts.php?post_id=84145

Andrej
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.