CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> CodeChargeStudio.Discussion

 Change default template extention to .htm

Print topic Send  topic

Author Message
Madlobster
Posted: 06/03/2003, 1:13 PM

Hello All,

Is there a way to default the extension on the HTML templates to .htm
instead of .html?

The only solution I have found so far is to change the extension and the
page that the script calls after they are generated.

There has to be an easier solution!!!

ML

DonB
Posted: 06/03/2003, 4:05 PM

But, how is this a problem? Why change it at all?

DonB


"Madlobster" <mehave@noemail.com> wrote in message
news:bbivgv$hsr$1@news.codecharge.com...
> Hello All,
>
> Is there a way to default the extension on the HTML templates to .htm
> instead of .html?
>
> The only solution I have found so far is to change the extension and the
> page that the script calls after they are generated.
>
> There has to be an easier solution!!!
>
> ML
>
>

Madlobster
Posted: 06/04/2003, 12:55 PM

My web host is set up to look for index.html then index.php. Consequently,
the template loads and the php page is not loaded. Talking to them, that
can't be changed on an account by account basis. They suggested renaming
the file.

I've checked it out. If there isn't a index.html or index.htm, the
index.php page loads.

Right now, I've renamed the template page to have an extension of .tmpl
instead of .html. This works fine.

I don't want to have to rename this and then change the reference in the
code file each time I generate/publish.


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:bbj9kj$8fk$1@news.codecharge.com...
> But, how is this a problem? Why change it at all?
>
> DonB
>
>
> "Madlobster" <mehave@noemail.com> wrote in message
>news:bbivgv$hsr$1@news.codecharge.com...
> > Hello All,
> >
> > Is there a way to default the extension on the HTML templates to .htm
> > instead of .html?
> >
> > The only solution I have found so far is to change the extension and the
> > page that the script calls after they are generated.
> >
> > There has to be an easier solution!!!
> >
> > ML
> >
> >
>
>

Roger Harris
Posted: 06/04/2003, 3:21 PM

I had the same problem with the original CC when using PHP with
templates. The only way I've ever found to work around it is to change
my default page to something like home.php, so the template is called
home.html, and then make a index.php with the following:

<?php
header("Location: home.php");
?>

This has to be at the top of the page, with no blank space before the
opening <?php tag.

hth,

Roger

Madlobster wrote:
> My web host is set up to look for index.html then index.php. Consequently,
> the template loads and the php page is not loaded. Talking to them, that
> can't be changed on an account by account basis. They suggested renaming
> the file.
>
> I've checked it out. If there isn't a index.html or index.htm, the
> index.php page loads.
>
> Right now, I've renamed the template page to have an extension of .tmpl
> instead of .html. This works fine.
>
> I don't want to have to rename this and then change the reference in the
> code file each time I generate/publish.
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:bbj9kj$8fk$1@news.codecharge.com...
>
>>But, how is this a problem? Why change it at all?
>>
>>DonB
>>
>>
>>"Madlobster" <mehave@noemail.com> wrote in message
>>news:bbivgv$hsr$1@news.codecharge.com...
>>
>>>Hello All,
>>>
>>>Is there a way to default the extension on the HTML templates to .htm
>>>instead of .html?
>>>
>>>The only solution I have found so far is to change the extension and the
>>>page that the script calls after they are generated.
>>>
>>>There has to be an easier solution!!!
>>>
>>>ML
>>>
>>>
>>
>>
>
>
Robert Rodgers
Posted: 06/04/2003, 3:21 PM

Madlobster

Why don't you create an entry page named index.htm.

Something like

http://www.electronicrevenue.com (A CCS site built by a colleague)

Then have a link to your beginning index.php page from there. Kind of like
the login button on the example page?

It is just a quick thought. I don't know if it will work for you.

Thanks.

rob

--
"Every absurdity has a champion to defend it"
Oliver Goldsmith
++++++++++++++++++++++++++++++

"Madlobster" <mehave@noemail.com> wrote in message
news:bblir3$9de$1@news.codecharge.com...
My web host is set up to look for index.html then index.php. Consequently,
the template loads and the php page is not loaded. Talking to them, that
can't be changed on an account by account basis. They suggested renaming
the file.

I've checked it out. If there isn't a index.html or index.htm, the
index.php page loads.

Right now, I've renamed the template page to have an extension of .tmpl
instead of .html. This works fine.

I don't want to have to rename this and then change the reference in the
code file each time I generate/publish.


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:bbj9kj$8fk$1@news.codecharge.com...
> But, how is this a problem? Why change it at all?
>
> DonB
>
>
> "Madlobster" <mehave@noemail.com> wrote in message
>news:bbivgv$hsr$1@news.codecharge.com...
> > Hello All,
> >
> > Is there a way to default the extension on the HTML templates to .htm
> > instead of .html?
> >
> > The only solution I have found so far is to change the extension and the
> > page that the script calls after they are generated.
> >
> > There has to be an easier solution!!!
> >
> > ML
> >
> >
>
>


DonB
Posted: 06/04/2003, 3:57 PM

Ouch, what were they thinking?

I suppose you could code the OnInitializeView event to set the template file
name to do this. I don't know if it is the same for PHP but with ASP this
variable is "TemplateFileName".

By changing this variable, you will cause CCS to load a different template
file than the default one (yourpagename.html). Any changing of this will
probably make deploying a real pain, though. I'd think CCS will still want
to deploy .html files.

You host is very, very screwed up. I'd consider changing if possible. I
also think you should recommend to Yes Software that using .html is a bad
idea. I like your idea of .tmpl. Makes a lot of sense. It is "special"
html anyway.

DonB


"Madlobster" <mehave@noemail.com> wrote in message
news:bblir3$9de$1@news.codecharge.com...
> My web host is set up to look for index.html then index.php.
Consequently,
> the template loads and the php page is not loaded. Talking to them, that
> can't be changed on an account by account basis. They suggested renaming
> the file.
>
> I've checked it out. If there isn't a index.html or index.htm, the
> index.php page loads.
>
> Right now, I've renamed the template page to have an extension of .tmpl
> instead of .html. This works fine.
>
> I don't want to have to rename this and then change the reference in the
> code file each time I generate/publish.
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:bbj9kj$8fk$1@news.codecharge.com...
> > But, how is this a problem? Why change it at all?
> >
> > DonB
> >
> >
> > "Madlobster" <mehave@noemail.com> wrote in message
> >news:bbivgv$hsr$1@news.codecharge.com...
> > > Hello All,
> > >
> > > Is there a way to default the extension on the HTML templates to .htm
> > > instead of .html?
> > >
> > > The only solution I have found so far is to change the extension and
the
> > > page that the script calls after they are generated.
> > >
> > > There has to be an easier solution!!!
> > >
> > > ML
> > >
> > >
> >
> >
>
>

Robert Rodgers
Posted: 06/04/2003, 4:14 PM

Of course you may need to rename your beginning page to something other than
index. Maybe default or index one or an even more descriptive name.

rob

--
"Every absurdity has a champion to defend it"
Oliver Goldsmith
++++++++++++++++++++++++++++++

"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:bblrco$rrk$1@news.codecharge.com...
Madlobster

Why don't you create an entry page named index.htm.

Something like

http://www.electronicrevenue.com (A CCS site built by a colleague)

Then have a link to your beginning index.php page from there. Kind of like
the login button on the example page?

It is just a quick thought. I don't know if it will work for you.

Thanks.

rob

--
"Every absurdity has a champion to defend it"
Oliver Goldsmith
++++++++++++++++++++++++++++++

"Madlobster" <mehave@noemail.com> wrote in message
news:bblir3$9de$1@news.codecharge.com...
My web host is set up to look for index.html then index.php. Consequently,
the template loads and the php page is not loaded. Talking to them, that
can't be changed on an account by account basis. They suggested renaming
the file.

I've checked it out. If there isn't a index.html or index.htm, the
index.php page loads.

Right now, I've renamed the template page to have an extension of .tmpl
instead of .html. This works fine.

I don't want to have to rename this and then change the reference in the
code file each time I generate/publish.


"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
news:bbj9kj$8fk$1@news.codecharge.com...
> But, how is this a problem? Why change it at all?
>
> DonB
>
>
> "Madlobster" <mehave@noemail.com> wrote in message
>news:bbivgv$hsr$1@news.codecharge.com...
> > Hello All,
> >
> > Is there a way to default the extension on the HTML templates to .htm
> > instead of .html?
> >
> > The only solution I have found so far is to change the extension and the
> > page that the script calls after they are generated.
> >
> > There has to be an easier solution!!!
> >
> > ML
> >
> >
>
>



Jerry
Posted: 06/04/2003, 4:29 PM

I once used
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=http://www.....etc....">
to go from index.html to default.php

dirty, but it works

Jerryb

"Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
news:bblugm$2pu$1@news.codecharge.com...
> Of course you may need to rename your beginning page to something other
than
> index. Maybe default or index one or an even more descriptive name.
>
> rob
>
> --
> "Every absurdity has a champion to defend it"
> Oliver Goldsmith
> ++++++++++++++++++++++++++++++
>
> "Robert Rodgers" <rrodgers@sylvancomputing.com> wrote in message
>news:bblrco$rrk$1@news.codecharge.com...
> Madlobster
>
> Why don't you create an entry page named index.htm.
>
> Something like
>
> http://www.electronicrevenue.com (A CCS site built by a colleague)
>
> Then have a link to your beginning index.php page from there. Kind of
like
> the login button on the example page?
>
> It is just a quick thought. I don't know if it will work for you.
>
> Thanks.
>
> rob
>
> --
> "Every absurdity has a champion to defend it"
> Oliver Goldsmith
> ++++++++++++++++++++++++++++++
>
> "Madlobster" <mehave@noemail.com> wrote in message
>news:bblir3$9de$1@news.codecharge.com...
> My web host is set up to look for index.html then index.php.
Consequently,
> the template loads and the php page is not loaded. Talking to them, that
> can't be changed on an account by account basis. They suggested renaming
> the file.
>
> I've checked it out. If there isn't a index.html or index.htm, the
> index.php page loads.
>
> Right now, I've renamed the template page to have an extension of .tmpl
> instead of .html. This works fine.
>
> I don't want to have to rename this and then change the reference in the
> code file each time I generate/publish.
>
>
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote in message
>news:bbj9kj$8fk$1@news.codecharge.com...
> > But, how is this a problem? Why change it at all?
> >
> > DonB
> >
> >
> > "Madlobster" <mehave@noemail.com> wrote in message
> >news:bbivgv$hsr$1@news.codecharge.com...
> > > Hello All,
> > >
> > > Is there a way to default the extension on the HTML templates to .htm
> > > instead of .html?
> > >
> > > The only solution I have found so far is to change the extension and
the
> > > page that the script calls after they are generated.
> > >
> > > There has to be an easier solution!!!
> > >
> > > ML
> > >
> > >
> >
> >
>
>
>
>

Christoph Grottolo
Posted: 06/06/2003, 5:40 AM

"DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote:

>You host is very, very screwed up. I'd consider changing if possible. I
>also think you should recommend to Yes Software that using .html is a bad
>idea. I like your idea of .tmpl. Makes a lot of sense. It is "special"
>html anyway.

It's not the host only. Imagine you want to distribute CCS
applications - you won't have control over the remote enivronments. If
you want to use index pages, you'll have to work with redirect
solutions to be sure that the visitors won't see the template file.

It was not the best idea of Yes to give the template files a html
extension. Maybe it would not be that difficult to give them another
extension (.tpl or alike) by default or to make that value
configurable through project settings.

While developing, there is an advantage of html: you can open the
template files in the browser and wysiwyg...

--Christoph
charisse
Posted: 06/06/2003, 9:25 AM


To solve this problem - I always code an index.html page.
Specifically I use this for SEO - an introduction to the
website/application, very keyword rich. The spiders eat it up and
I usually end up with some deep linking.
"Christoph Grottolo" <cg@gordimer.net> wrote in message
news:rl21evclp2fn8q0i0mmq3a82lagh11lr89@4ax.com...
> "DonB" <7432D63DBB01D03A196B1EDD80E8@comcast.net> wrote:
>
> >You host is very, very screwed up. I'd consider changing if
possible. I
> >also think you should recommend to Yes Software that using
..html is a bad
> >idea. I like your idea of .tmpl. Makes a lot of sense. It
is "special"
> >html anyway.
>
> It's not the host only. Imagine you want to distribute CCS
> applications - you won't have control over the remote
enivronments. If
> you want to use index pages, you'll have to work with redirect
> solutions to be sure that the visitors won't see the template
file.
>
> It was not the best idea of Yes to give the template files a
html
> extension. Maybe it would not be that difficult to give them
another
> extension (.tpl or alike) by default or to make that value
> configurable through project settings.
>
> While developing, there is an advantage of html: you can open
the
> template files in the browser and wysiwyg...
>
> --Christoph


   


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.