Webmastersite.net
Register Log In

guidance
replacing spaces on generate static HTML

Comments on guidance

peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 08, 2006 - 9:19 AM:

Paul,

Could you please give me some guidance on how to
change spaces of the category names to "_",
this on their URL, when generating static HTML pages.
This as the same way we already have it for url rewrite.

At the moment I have tried without effect:

- At Admin Panel-> Generate HTML -> Advanced:
Name categories as
I have changed
" {CATNAME}{PAGE}.html " to
" <?php echo(str_replace(' ','_','{CATNAME}')); ?>{PAGE}.html "
but without effect.

- At clases/category.php
In function staticname()
I have included the str_replace function in different ways, but without effect

Thanks in advance.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 12, 2006 - 9:04 PM:

I thought it replaced spaces for HTML. Will make it do so.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 12, 2006 - 10:31 PM:

Excellent, awaiting for this feature. Thanks.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 14, 2006 - 4:07 PM:

Should work in the current 3.3.22.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 15, 2006 - 2:05 AM:

I have just tested on 3.3.22 multilingual and englishonly
installs, and it does not to work for me.

At Name categories as, I have changes cat{CATID} to {CATNAME}. Do we have another variable to use here ?

Thanks
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 17, 2006 - 5:29 AM:

I was thinking you were using subdirectories, those automatically name using {CATSTATICNAME}.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 17, 2006 - 8:53 PM:

Paul,

At Generate HTML:

a) Stating:
Name categories as: {CATNAME}{PAGE}.html
This does not generate URL with categories or subcategories names that replace the spaces with "_".

And

b) Stating:
Name categories as: {CATSTATICNAME}{PAGE}.html
After pressing "Generate Html" button, the process can not be iniciated and a "page can not be found" appears.

Tested at ver 3.3.22.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
Posted Jul 18, 2006 - 12:34 PM:

Suffice it to say I don't really see the application, the ability to change the .html name is mainly there to allow naming as index.html when using subdirectories, perhaps it doesn't accept other sorts of changes.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
Posted Jul 19, 2006 - 10:28 PM:

As an example,
the static file: "My first category.html"
is presented at the URL as: "../My%20first%20category.html"
So it would be useful to save the files replacing the spaces in order not to have the "%20" at the URLs.

Ideallly would be to have this same category saved as "My_first_category.html", this way at the URL will be presented the same way. I hope it make sense.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#10 - Quote - Permalink
Posted Jul 23, 2006 - 10:09 AM:

What I'm suggesting is that you use /My_first_category/ (aka /My_first_category/index.html) instead. I may see later if My_first_category.html can be supported though.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
#11 - Quote - Permalink
Posted Jul 25, 2006 - 9:07 PM:

Thanks for the clarification, but unfortunatelly it still does not work for me:

Now I have entered:
Name categories as {CATSTATICNAME}

And after pressing "Generate Html" button, the process can not be initiated and a "page can not be found" appears.

Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#12 - Quote - Permalink
Posted Jul 27, 2006 - 9:08 AM:

Now I have entered:
Name categories as {CATSTATICNAME}


You're doing exactly the opposite of what I said... I said it worked named as index.html, using subdirectories.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
#13 - Quote - Permalink
Posted Jul 28, 2006 - 9:56 PM:

Ok thanks. I confirm it working as you mention.
peumus
Forum Regular

Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile

Total Topics: 172
Total Comments: 462
peumus
#14 - Quote - Permalink
Posted Jul 28, 2006 - 11:42 PM:

Paul,
A detail to consider,
On one test directory, when clicking on a category
we are redirected to the message "page not found" of the 'badrequest.tpl'. On another test directory, the badrequest.tpl template does not work and we are redirected to the corresponding index.html within the category. Would be useful to be redirected directly to the file we state on the Name Categories as: myfile
As a solution for the moment, if we state:
Name categories as: index.php ,
we are redirected directly to the index.php page on both cases.

By the way, I do not remember/find if we can enable/disable the 'badrequest.tpl' functionality, do we control this functionality?

Thanks.
Paul
developer

Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California

Total Topics: 61
Total Comments: 7868
Paul
#15 - Quote - Permalink
Posted Jul 29, 2006 - 5:29 PM:

I don't know what "disabling" the dead page page would mean, I guess you can redirect it to a 404 page of your choice by editing the template.
Search thread for
Download thread as
  • 0/5
  • 1
  • 2
  • 3
  • 4
  • 5



This thread is closed, so you cannot post a reply.