Pages

Page URL route? - Pages

Page URL route?

by M.O.B. » Fri Oct 31, 2014 9:19 pm

Page URL route:
The route is used in the URL to access the page, e.g. phpBB/page/route. Only letters, numbers, hyphens and underscores are allowed. This is a required field.


Can you give some examples what needs to be placed here? Still learning how to use this. :)
Image
User avatar
M.O.B.
Registered User
Posts: 942
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: Page URL route?

by MattF » Fri Oct 31, 2014 9:23 pm

Whatever you want your page's url route to be.

An about us page: about

A discography page: discography

A FAQ: faq

A gallery: gallery

The /page/ part is mandatory and automatically done. You just control what comes after /page/ and it can only be alphanumeric with hypens and underscores
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Page URL route?

by Pico88 » Fri Oct 31, 2014 9:23 pm

But don't use /.
Please do not PM me for support.
User avatar
Pico88
Registered User
Posts: 878
Joined: Sat Mar 07, 2009 10:24 pm
Location: Poland
Name: Lukasz
Contact:

Re: Page URL route?

by M.O.B. » Fri Oct 31, 2014 9:27 pm

Ah, I see. My mistake was that I thought I had to put down a path as in the instructions say:

phpBB/page/route

Maybe you can update that part, unless I am the only one that got confused? It wouldn't be the first time. I tend to follow instructions to a "T". :)
Image
User avatar
M.O.B.
Registered User
Posts: 942
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: Page URL route?

by MattF » Fri Oct 31, 2014 10:19 pm

You're not the only one, but I don't get why people don't understand it when it says route can only be letters, numbers, hyphens and underscores...that rules out slashes... We'll try to use some emphasis or highlighting to make it more obvious
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Page URL route?

by MattF » Fri Oct 31, 2014 10:31 pm

How is this (making route bold):

The route is used in the URL to access the page, e.g. phpBB/page/route. Only letters, numbers, hyphens and underscores are allowed. This is a required field.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Page URL route?

by M.O.B. » Fri Oct 31, 2014 11:35 pm

That might work. Perhaps, also, include some examples like you gave me above. That nailed it for me!

Another thing. I am so pissed off at you (jokingly). :)

I never knew that the "static pages mod" was to create extra pages for phpBB 3.0.x. I think I saw it once when searching for such feature, but you did not include screenshots, so I must have skipped it.

Damn, you don't know what I had to do to create multiple template.php with the html counterparts to do this. I could have saved a lot of time!!!

Since I haven't gone live with 3.1.x, I plan to install your old MOD to 3.0.12 and update all my extra pages, and then when I upgrade my database to 3.1.x, I won't have to redo it again. :)

I plan to go live with 3.1.x, once mostly all the important MODs have been converted to 3.1.x by the devs.

Thanks! :)
Image
User avatar
M.O.B.
Registered User
Posts: 942
Joined: Tue Jan 04, 2005 1:07 am
Location: San Diego CA USA
Contact:

Re: Page URL route?

by lavachapi » Sat Nov 01, 2014 8:35 am

About “route”, shouldn't be called “function_name” or “model_name” as “route” is almost untranslatable and is source of incomprehension ?
E.g. French translation says "chemin" that is translated in English as "path".

So any file names must be built like this extensionprefix_functionname.fileextension where "extensionprefix" is "pages" then "functionname" is anything able to explain what it does and finally file extension e.g ".gif".

So a PayPal template may be named "pages_paypal.html" and in this case PayPal button must be named "pages_paypal.gif".
lavachapi
Registered User
Posts: 54
Joined: Sat Nov 01, 2014 8:12 am
Contact:

Re: Page URL route?

by MattF » Sat Nov 01, 2014 9:55 pm

lavachapi wrote:About “route”, shouldn't be called “function_name” or “model_name” as “route” is almost untranslatable and is source of incomprehension ?
E.g. French translation says "chemin" that is translated in English as "path".

Path is fine as a translation for route. It's a part of the url, or url identifier, that you can define.

lavachapi wrote:So any file names must be built like this extensionprefix_functionname.fileextension where "extensionprefix" is "pages" then "functionname" is anything able to explain what it does and finally file extension e.g ".gif".

So a PayPal template may be named "pages_paypal.html" and in this case PayPal button must be named "pages_paypal.gif".


Icons get their name from the url route, because they are tied to that link.

Custom templates can be named whatever you like, as long as it starts with pages_

You could have a route named "foobar" (/pages/foobar) that uses a custom template named "pages_helloworld.html" if you want. The custom link icon would be "pages_foobar.gif"
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Page URL route?

by lavachapi » Sun Nov 02, 2014 12:49 am

^ My fault, I should have said :
So a PayPal page may be named "pages_paypal.html" and in this case PayPal button must be named "pages_paypal.gif".


Now it seems to me "route" is still unsatisfactory and to be honest I would prefer way Joomla! is working calling it "alias" (that is used in URLs for SEO) as only part of a path, not as absolute path nor as relative path but just as SEO name of a page readable in an URL.
"alias" is easily translatable and used in many CMS like Joomla!, Wordpress, Drupal… thus it is easily comprehensible as a normalization. And it may have a prefix (numeral in Joomla!) and a file extension or not, but exactly like with phpBB's Pages extension : without spaces, only alphanumeric + -_

Now enough with this but I would use "alias" in future distributions. My 2 €¢.
lavachapi
Registered User
Posts: 54
Joined: Sat Nov 01, 2014 8:12 am
Contact:

Re: Page URL route?

by MattF » Sun Nov 02, 2014 12:52 am

we'll look into that
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact:

Re: Page URL route?

by ..777.. » Sun Nov 02, 2014 3:11 pm

VSE wrote:You're not the only one, but I don't get why people don't understand it when it says route can only be letters, numbers, hyphens and underscores...that rules out slashes... We'll try to use some emphasis or highlighting to make it more obvious

i tried to get it right for an extended amount of time. trying every single combination I could think of. if it were not for this thread being made its quite possible i would still be trying. :lol:

Thank you M.O.B for making this thread. :mrgreen:
..777..
Registered User
Posts: 150
Joined: Tue Oct 28, 2014 5:43 pm
Contact:

Re: Page URL route?

by zoetrope » Fri Nov 14, 2014 4:05 pm

Came here with the same question. This one really had me stumped. Thanks.
zoetrope
Registered User
Posts: 67
Joined: Tue Dec 31, 2002 4:57 pm
Contact:

Re: Page URL route?

by lws96 » Mon Nov 24, 2014 9:29 pm

Ok, I have to drum up this post only because I have a similar question.

So in the Pages extension, the pages are created under phpBB/page/<pagename> and cannot link to anything "outside" the directory? I have many custom links that the people before me had created under http://www.domain.com/pages instead of http://www.domain.com/phpBB/pages that I just link to inside phpBB. Will I need to copy/paste the contents and re-format to BBCode or is there a better extension to use and be able to retain the HTML formatting?
lws96
Registered User
Posts: 100
Joined: Wed Aug 05, 2009 4:39 am
Contact:

Re: Page URL route?

by MattF » Mon Nov 24, 2014 11:28 pm

Pages are created under whateveryourforumindexurlis/pages/<pagename>

This extension is for adding pages to phpBB, your forum. They are an add-on to the forum. They have nothing to do with pages outside of the forum. Also if you read the extension's features you will see it says it supports HTML.
Formerly known as VSEMy ExtensionsPlease do not PM me for support.
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5262
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman
Contact: