Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2017-09-01 09:58:09

etc
Developer
Registered: 2010-11-11
Posts: 5,082
Website GitHub

Re: How to remove slash in section url?

There seems to be a 50/50 pro/con trailing slash ratio among txp users, I’m perplex.

  • Pro: it’s semantic, backwards-compatible and more convenient with relative urls.
  • Con: the trailing slash is easy to append (manually), but not to remove.

Neither really avoids content duplication per se. Poll?

Offline

#14 2017-09-01 10:14:57

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: How to remove slash in section url?

etc wrote #306813:

  • Con: the trailing slash is easy to append (manually), but not to remove.

Hi Oleg,

I guess we could have the section name as section/ and the title as Section. Is this what you were thinking of?

txp on the other hand always tried to retain backward compatibility, as you say.

… Poll?

Why not:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#15 2017-09-01 10:39:36

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: How to remove slash in section url?

colak wrote #306814:

Poll?

OK, issue here. Vote your hearts out…

Offline

#16 2017-09-01 10:50:03

etc
Developer
Registered: 2010-11-11
Posts: 5,082
Website GitHub

Re: How to remove slash in section url?

colak wrote #306814:

I guess we could have the section name as section/ and the title as Section. Is this what you were thinking of?

Hi Yiannis. I mean, if txp does not append the trailing slash to section urls, but someone wants it, he can just add it manually: <txp:section url="1" />/. But removing the slash is not that easy.

philwareham wrote #306817:

OK, issue here. Vote your hearts out…

It could also be a preference, if the translation team can afford an extra string.

Offline

#17 2017-09-01 10:51:56

philwareham
Core designer
From: Haslemere, Surrey, UK
Registered: 2009-06-11
Posts: 3,564
Website GitHub Mastodon

Re: How to remove slash in section url?

etc wrote #306818:

It could also be a preference, if the translation team can afford an extra string.

Sure, additional translation strings are not a problem (in moderation). We have a few to add for 4.7 already so one more won’t be an issue.

Offline

#18 2017-09-01 12:30:55

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 308
Website GitHub GitLab Twitter

Re: How to remove slash in section url?

I do not have Github account, and the voting looks a bit hasty.

Not only section in question — all the indexes of links to articles (by author, by category, by keyword, search results, the front page) should be clearly separated from these articles in serious Web publications.

Thus every index URL should end with / or be 301 redirected to the slash. To avoid duplicated contents, and for usability reasons.

Last edited by Vienuolis (2017-09-01 13:07:08)

Offline

#19 2017-09-01 13:47:09

zenman
Member
Registered: 2017-08-28
Posts: 41
Website

Re: How to remove slash in section url?

Some CMS like WP have slash, some like OpenCart do not.
If TXP administrator is able to switch to slash or non-slash, it will be one more step towards the ideal CMS :)

I think with short urls like site.com/title slash after section url may not be not necessary.
With this mode site.com/section/title, it is OK.

Last edited by zenman (2017-09-01 13:51:10)

Offline

#20 2017-09-01 14:20:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: How to remove slash in section url?

etc wrote #306818:

Hi Yiannis. I mean, if txp does not append the trailing slash to section urls, but someone wants it, he can just add it manually: <txp:section url="1" />/. But removing the slash is not that easy.

It could also be a preference, if the translation team can afford an extra string.

Hi Oleg,

Apologies, I should have been clearer. As there are sites which use zem_redirect, the slash might be taken out from the url if the plugin decides so as to keep consistency. That is why adding the slash in the Section name would ‘cement’ the url. I am thinking in the lines of URL-only title for articles.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#21 2018-03-02 15:22:44

catonine
New Member
Registered: 2018-03-02
Posts: 9

Re: How to remove slash in section url?

There is a simple way to remove slash at the end of section

in v. 4.6.2 open /textpattern/txplib_misc.php

5401 line

$url = hu.urlencode($keys[‘s’]).’/’;

Need to change to
$url = hu.urlencode($keys[‘s’]).’‘;

Offline

#22 2018-03-02 16:02:41

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,076
Website Mastodon

Re: How to remove slash in section url?

which leads me to ask: Why do we need a “/” at the end of the url?


…. texted postive

Offline

#23 2018-03-02 16:06:42

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: How to remove slash in section url?

bici wrote #309584:

which leads me to ask: Why do we need a “/” at the end of the url?

I like slashes:) In static sites they indicate a directory root. In the txp case I see them as representing the first page of collated content.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#24 2018-03-02 16:25:51

bici
Member
From: vancouver
Registered: 2004-02-24
Posts: 2,076
Website Mastodon

Re: How to remove slash in section url?

;-) ok.
Then why would some want to remove them?

And I note that some cms’es don’t include the slash at the end:
https://www.zzz.xom/sample.html but in this case add the annoying .html


…. texted postive

Offline

Board footer

Powered by FluxBB