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
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.
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.
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.
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.
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?
Comments on guidance
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I thought it replaced spaces for HTML. Will make it do so.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Excellent, awaiting for this feature. Thanks.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
Should work in the current 3.3.22.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I was thinking you were using subdirectories, those automatically name using {CATSTATICNAME}.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
Ok thanks. I confirm it working as you mention.
Forum Regular
Usergroup: Customer
Joined: Aug 09, 2004
Location: Chile
Total Topics: 172
Total Comments: 462
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.
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
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.