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 -> General/Other

 CSS and templating

Print topic Send  topic

Author Message
BobKat

Posts: 7
Posted: 02/14/2008, 7:19 AM

Another basic question probably... as per other topic, my client has a site part-made with CCS 3.1. They now need to rework the site so I'm trying to work out whether CCS will do what we need:

The CCS-built sections are user registration / login / profile management, and a separate area of management-type reports.
The main site will be rebuilt in PHP so there'll be PHP includes for nav, masthead, footer etc as per usual.

The nav will need to be PHP because the displayed nav changes according to section (tabbed, sublinks etc).

Another reason for wanting PHP templating is that later we'll need to make the site multi-lingual. So PHP templates that pull in language files according to a parameter would be ideal.

But it seems CCS will only use HTML templates, is that right? It looks like I won't be able to use the PHP inc's made for the rest of the site. In which case perhaps we'd have to reproduce the nav mechanisms somehow, within CCS - a guess. Any clues would be appreciated.

Thanks,
Bill
View profile  Send private message
wkempees
Posted: 02/14/2008, 7:45 AM

Not quite sure I understand the question to the full, but being
Valentine's.................

CCS PhP+Templates:
The PhP Coding is separated from the HTML templates, in fact one can store
the HTML templates in it's own subdir.
The Templates then can be edited and customized without influencing the
coding.
All data transfer is through the templating variables system.

One possibility is to have variables in the page, set to HTML and assign
those daa by executing an included external phpscript. Basicaly redirecting
(assigning) the output of that script to the template variable.
Another is to port the external phpscripts to CCS versions.
Even straight inclusion is a possibility.
So, as far as I 'get' the Q there are A's available a plenty.

Walter

"BobKat" <BobKat@forum.codecharge> schreef in bericht
news:247b45c0eec4e0@news.codecharge.com...
> Another basic question probably... as per other topic, my client has a
> site
> part-made with CCS 3.1. They now need to rework the site so I'm trying to
> work
> out whether CCS will do what we need:
>
> The CCS-built sections are user registration / login / profile
> management, and
> a separate area of management-type reports.
> The main site will be rebuilt in PHP so there'll be PHP includes for nav,
> masthead, footer etc as per usual.
>
> The nav will need to be PHP because the displayed nav changes according to
> section (tabbed, sublinks etc).
>
> Another reason for wanting PHP templating is that later we'll need to make
> the
> site multi-lingual. So PHP templates that pull in language files according
> to a
> parameter would be ideal.
>
> But it seems CCS will only use HTML templates, is that right? It looks
> like I
> won't be able to use the PHP inc's made for the rest of the site. In which
> case
> perhaps we'd have to reproduce the nav mechanisms somehow, within CCS - a
> guess.
> Any clues would be appreciated.
>
> Thanks,
> Bill
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

BobKat

Posts: 7
Posted: 02/14/2008, 8:11 AM

Many thanks for the quick reply Walter.

I'm hampered by almost total lack of CCS knowledge, but what I was trying to get at was is it possible to have PHP templates intead of HTML ones.

I understand (roughly) the templates are separated from CCS code. What we really need is templates that are PHP, so they can be executed and render different layouts.

E.g. the nav is tabbed, 7 tabs, and a different tab is highlighted according to which site section is being viewed. We'd normally make that nav include a single PHP file, and include it as per normal; set a var in the parent page, which the nav include uses to decide what tab to highlight.

Whereas from what little I understand, or misunderstand, it looks like we'd have to have a nav include per tab, i.e. 7 separate nav inc's. Or find some other CCS way to do it,

cheers
Bill
View profile  Send private message
datadoit
Posted: 02/14/2008, 9:27 AM

CCS is also event-driven, in that you have control over what happens
when and where to the page or controls within the page. So for your
example there are a myriad of ways to accomplish this in CCS. One way,
as you state, would be to have several includes for each menu structure.
Another, probably easier, way would be to have each menu option
dynamically assigned. Similar to:

Page BeforeShow:

global $FileName, $NavOption1, $NavOption2, $NavOption3;
if ($FileName == "thispage.php") {
$NavOption1->Visible = true;
$NavOption2->Visible = true;
$NavOption3->Visible = false;
}

This is just an idea of how it'll look...

Secondly, CCS has built-in translation mechanisms that makes it
easy-breezy to incorporate many languages.
wkempees
Posted: 02/14/2008, 10:02 AM

DD, nothing to add to that.

Even straight inclusion of the so called PHPtemplates might be an option.

Walter

BobKat

Posts: 7
Posted: 02/18/2008, 3:22 AM

Thanks for that. Time to experiment with the demo version I guess.

Tried to include our single PHP nav file, that didn't work, it parsed the include line as text/html.

But if we can write a re-usable function, that would do the job, kind of along the BeforeShow code sample lines.

Thanks for the help all.
View profile  Send private message
wkempees
Posted: 02/18/2008, 4:34 AM

Interesting.
Expect follow up here or elswhere in the forums.
Might even offer help on solving bits and pieces, if needed.

Walter

BobKat

Posts: 7
Posted: 02/18/2008, 6:28 AM

Thanks Walter....
The client has recovered the CCS 3.1 source files, so I can look into bringing those into the 4.0 demo, and have a dig around.

A spanner in the works just thrown into the mix, is an impossible deadline (as in, a date that's already passed...); might be forced to rewrite things in PHP for now, prob quicker and less riskier for the project than learning CCS. But I'm pretty sold on CCS as a tool.

edit:
perhaps I didn't try the include correctly; I added an 'include' directive to a CCS-generated PHP file; not having the CCS demo at the time.
Will dig into it some more.
View profile  Send private message
wkempees
Posted: 02/18/2008, 8:57 AM

Have a bucket full of those spanners......
If you are as fluent in PhP as me, you'll make it, lol.
Although CCS/PhP proved me faster everytime upto now.

Walter


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.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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