Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 06:17:23 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Interested in joining the WebsiteBaker team?
For more Information read
here
or on our
new website
.
155555
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Page titles as file name - is it possible ?!
Pages: [
1
]
Go Down
Author
Topic: Page titles as file name - is it possible ?! (Read 1784 times)
noway
Offline
Posts: 9
Page titles as file name - is it possible ?!
«
on:
January 21, 2008, 07:25:05 PM »
I`m need that my
pages file name
was taken not from "menu title" string but
from "page title"
instead. For example: menu string on page - "My favorite programs", but I wish that file name of this page will be very short - "favorite.php" (not my_favorite_program
s.php).
I'm found such solution: in module admin\pages\settings2.php in lines from 118 till 128
replace
page_filename($menu_title)
with
page_filename($page_title)
and in search module search\search.php in line 233 string
$page['page_title']
need to replace with
$page['menu_title']
Everithing work fine (as I wish), but I'm not sure that there was all needed correction.
Is anybody have more perfect solutions of my problem? (may be additional field "File name" to leave page_title untouched).
«
Last Edit: January 26, 2008, 09:48:04 PM by noway
»
Logged
marathoner
Offline
Posts: 495
Re: Page titles as file name - is it possible ?!
«
Reply #1 on:
January 22, 2008, 06:51:36 PM »
Why don't you simply to "Modify Page Settings" can change the Page Name to "favorite.php"?
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #2 on:
January 22, 2008, 07:03:13 PM »
Quote from: marathoner on January 22, 2008, 06:51:36 PM
Why don't you ... change the Page Name to "favorite.php"?
Because there is no such field - "Page Name"
There only "Page Title:" and "Menu Title:"
Logged
marathoner
Offline
Posts: 495
Re: Page titles as file name - is it possible ?!
«
Reply #3 on:
January 22, 2008, 08:03:21 PM »
I'm just curious...why is the actual filename important? Do you want to display it somewhere?
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #4 on:
January 23, 2008, 06:31:59 AM »
Quote from: marathoner on January 22, 2008, 08:03:21 PM
I'm just curious...
I don`t care about is it "curious" or "not curious" - I just need this feature. Even more - I don't want to see "/pages/" in url of my pages (but this is another question).
So... can anybody
realy help
me to solve my problem:
I need to set page file name manualy and it must be differ from corresponding menu title
.
Simple question... I hope solution must be simple to
Logged
ruebenwurzel
WebsiteBaker Org e.V.
Offline
Posts: 7973
Re: Page titles as file name - is it possible ?!
«
Reply #5 on:
January 23, 2008, 09:51:50 AM »
Hello,
if you wanna have your personal page names you only can do this manually. Simply don't use the builtin menufunction, create the pages with the names you wish and hardcode the menu in your template.
If you wanna have this automized you need to rewrite some corefiles of WB (and even some modules)
To your second part with the pages dir. You can change this in the advanced settings of WB. But this should be done before creating the first page. Changing this on an existing page can cause that all generated pages are no more reachable. Setting Pages Dir to root only works if your hoster allows to create files with scripts in the root. But i do not recommand with 2.6.7 to use another pages directory than /pages as some modules and even core files of WB have the /pages dir hardcoded. For the corefiles we will fix this in the next version.
Matthias
«
Last Edit: January 23, 2008, 09:57:06 AM by ruebenwurzel
»
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #6 on:
January 23, 2008, 10:13:05 AM »
Quote from: ruebenwurzel on January 23, 2008, 09:51:50 AM
... you need to rewrite some corefiles of WB (and even some modules) ...
Yes! I want definitely this! And I was found possible solution.
But the very first my question was: "I'm not sure that there was all needed correction".
Is here any WSB user which already done this and can tell me is this enough, or impart to me his own "best practice"?
Logged
marathoner
Offline
Posts: 495
Re: Page titles as file name - is it possible ?!
«
Reply #7 on:
January 23, 2008, 04:13:59 PM »
@noway
The reason that I was curious was I thought that there may be a different way to solve your problem without rewriting core files and modules. Your tone seems quite strong for someone looking for free advice. Have fun rewriting core files and modules!
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #8 on:
January 23, 2008, 06:09:52 PM »
Quote from: marathoner on January 23, 2008, 04:13:59 PM
@noway
....Your tone seems quite strong for someone looking for free advice...
No, no, no!!! There is not "bad" tone. There is only MY BAD ENGLISH
(which is not my native language). Sorry if I offend somebody. Don't pay any attention on the "tone" of my post, take a look only on the core of the problem. I'm realy looking for advice. Sorry, once more.
A few words about the history of problem: my site will be in russian, so, menu title (for example) for page "My favorite programs" (is very easy to understand and remember in english) in russian transcription will become a stupid transliteration like "moi_lyubimye_progra
mmy". That is why I wont to manualy set page name to simple "favorite" and URLs of my pages will become short, clear and easy to remember
«
Last Edit: January 23, 2008, 06:37:04 PM by noway
»
Logged
pcwacht
AddOn Development
Offline
Posts: 2859
Re: Page titles as file name - is it possible ?!
«
Reply #9 on:
January 23, 2008, 08:10:08 PM »
Since your problem isn't answered yet by another wb user I think testing it yourself might be an answer to your solution
You wrote:
Quote
I'm found such solution: in module admin\pages\settings2.php in lines from 118 till 128
replace
page_filename($menu_title)
with
page_filename($page_title)
Everithing work fine (as I wish), but I'm not sure that there was all needed correction.
Everything work fine.... if so you have found your own answer
One other option,without editing the corefiles, I can think of is copying the 'odd' filename to an easier filename
The content of each wb-created page (file) is simple enough to follow
Have fun, and good wb-ing
John
Logged
http://www.ictwacht.nl
= Dutch ICT info
http://www.pcwacht.nl
= My first
both still work in progress, since years.....
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #10 on:
January 23, 2008, 08:50:02 PM »
Quote from: pcwacht on January 23, 2008, 08:10:08 PM
One other option,without editing the corefiles, I can think of is copying the 'odd' filename to an easier filename
The content of each wb-created page (file) is simple enough to follow
Sorry once more... I can`t understand nothing in you reply
Please be patient to a foreigner and speak with him as with a "baby"...
Logged
thorn
Offline
Posts: 980
Re: Page titles as file name - is it possible ?!
«
Reply #11 on:
January 23, 2008, 10:30:23 PM »
Quote from: noway on January 21, 2008, 07:25:05 PM
I`m need that my
pages file name
was taken not from "menu title" string but
from "page title"
instead.
i see a need for this in general , too.
Quote
I'm found such solution: in module admin\pages\settings2.php in lines from 118 till 128
replace
page_filename($menu_title)
with
page_filename($page_title)
Everithing work fine (as I wish), but I'm not sure that there was all needed correction.
This seems to be all what you have to change (as far as i can see).
But you can't use module "menu_link", without changing that, too!
Will try to implement this in WB2.7
BTW:
Quote
in russian transcription will become a stupid transliteration like "moi_lyubimye_progra
mmy"
would be a pleasure if you could provide a better one. I made this "stupid transliteration", following ISO 9:1995 (without the accents - we can use pure ASCII only!) - because we needed one, and i doesn't know anything about the Russian language and Cyrillic characters.
thorn.
Logged
Projekte
vizmotion
Offline
Posts: 107
Re: Page titles as file name - is it possible ?!
«
Reply #12 on:
January 24, 2008, 03:32:04 AM »
Another thought.
I ran into this issue the yesterday when I wanted for SEO purposes to give my files a different name than the menu name. I decided that it did not make enough of a difference to change the code but it would be nice to have a mechanism to be able to change the file name.
The best idea seems to be the default still worked the same as now but you could override the file name if you wanted. Thanks.
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #13 on:
January 24, 2008, 07:44:12 AM »
Quote from: thorn on January 23, 2008, 10:30:23 PM
I made this "stupid transliteration", following ISO 9:1995 (without the accents - we can use pure ASCII only!) - because we needed one, and i doesn't know anything about the Russian language and Cyrillic characters.
Your transliteration is perfect - don't worry
It become "stupid" because it is very unordinal (for "cyrillic eye") view russian texts composed with latin leters. Many russian-speaked peolple know commom english words, and it is much easy to use and understand it instead of direct transliteration.
Quote from: thorn on January 23, 2008, 10:30:23 PM
Will try to implement this in WB2.7
As for me, the most common solution wil be next. WB must have individual fields for every part of page, i.e.
PageTitle
PageFileName
MenuText (which is points to this page)
MenuHint (for place it in popup or in status bar)
The defaults for PageFileName and PageTitle (if there are empty) - MenuText (transliterated by ISO)
Maybe it will be useful to setup PageFileName even with full path from the root directory (I`m yet not sure about this).
Can you additionaly tell me about posibility of such realisation? When it may be ready? Do you need any additional help from me in this process (may be as betta-tester)?
Logged
doc
Guest
Re: Page titles as file name - is it possible ?!
«
Reply #14 on:
January 24, 2008, 08:19:36 AM »
Hello,
this feature will most likely not be implemented to WB 2.7 as such a solution needs proper testing and should not be implemented in a rush. We will discuss and check this out, but at this stage we can not promise to integrate this features into WB 2.7.
However, once a solution was found, we will post it here in the forum.
Regards Christian
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #15 on:
January 24, 2008, 12:05:34 PM »
Thank you very much for attention to my problem!
I will wait for your right solution. The only thing which I want you to ask - take into consideration that I, and maybe other WSB-users (reader of this thread) will use my solution (with correction of core file). So, it will be great, if yours next releases in some way will be able to transparently upgrade this modified structure of pages, its (nonstandart) names and its (nonstandart) layout on disk.
Thank to all for yours assistance
Logged
doc
Guest
Re: Page titles as file name - is it possible ?!
«
Reply #16 on:
January 24, 2008, 04:59:44 PM »
Hello,
it is up to the user to take care that changes introduced to the core files will be re-introduced by the user when upgrading to the next version, not to the developers of WB.
So feel free to implement what ever tweak you want to the core files of WB, but keep in mind you have to take care when upgrading to a newer version.
Regards Christian
Logged
noway
Offline
Posts: 9
Re: Page titles as file name - is it possible ?!
«
Reply #17 on:
January 26, 2008, 09:46:49 PM »
I was found once more place which must be corrected:
in search module search\search.php in line 233 string
$page['page_title']
need to replace with
$page['menu_title']
This is because in page_title now we place file name, but in search results we need to see some text. So menu title is more informative than file name.
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...