Page 1 of 2

Space in H1 when the title is personalized

Posted: Mon 1. Feb 2021, 19:11
by Doc
Hello

When we have chosen a personalized title instead of the menu link, we get a space in the code between the <h1> tag and the beginning of the title.
<h1>MyTitle</h1>
<h1>spaceMyCustomTitle</h1>
Do you know why ?

Daniel.

Re: Space in H1 when the title is personalized

Posted: Mon 1. Feb 2021, 21:50
by Gert
Hello,

sorry - I do not understand what you mean.

Have you a link for me?

Gert

=================================

PS: Do you mean an alternative page heading? That I can reproduce ... will have a look tomorrow.

Re: Space in H1 when the title is personalized

Posted: Mon 1. Feb 2021, 22:18
by Gert
Hello Daniel,

I have found it, will be fixed in the next version.

It is a very ancient bug in the page_params plugin, nobody has noticed it, since more than 10 years :mrgreen: - you can fix it by yourself, because there will not be a new CMSimple version next days.

Open ./plugins/page_params/index.php, search for "\\1 " and remove the space behind the 1 (two times), and the problem is gone,

Gert

Re: Space in H1 when the title is personalized

Posted: Tue 2. Feb 2021, 08:33
by Doc
Hello
I myself only noticed it recently. It has no influence on SEO. But for a clean code ...
Thanks, Daniel

Re: Space in H1 when the title is personalized

Posted: Tue 23. Feb 2021, 17:02
by jack31
Hello,

Is there a disadvantage in settings.CMS/Uri separator to replace "__" by "-" ?

Moreover, why this choice in URL's of "__" and not "-" as we usually see ?

Re: Space in H1 when the title is personalized

Posted: Tue 23. Feb 2021, 18:07
by Gert
jack31 wrote: Tue 23. Feb 2021, 17:02 Is there a disadvantage in settings.CMS/Uri separator to replace "__" by "-" ?
I would not do so, because "-" is an often used character in page names,

Gert

Re: Space in H1 when the title is personalized

Posted: Tue 23. Feb 2021, 18:18
by jack31
Sorry, I love "-" ! :mrgreen:
If I fill in "_", is it OK ?

Re: Space in H1 when the title is personalized

Posted: Tue 23. Feb 2021, 18:25
by Gert
jack31 wrote: Tue 23. Feb 2021, 18:18 If I fill in "_", is it OK ?
Try it - but do not wonder about the results :mrgreen:

I will not make test series with that.
jack31 wrote: Tue 23. Feb 2021, 18:18 Sorry, I love "-" ! :mrgreen:
Why you do not try "---" :?:

Gert

Re: Space in H1 when the title is personalized

Posted: Tue 23. Feb 2021, 18:34
by jack31
Because I didn't know it existed ;)

Well, it's prettier that way.

Re: Space in H1 when the title is personalized

Posted: Wed 24. Feb 2021, 09:47
by Doc
Hello
Originally, it seems like it was for Facebook who didn't like the ":" as a separator. I use the "-" without worry.
If we use some of the 2021 Templates, we must remember to change in the template file /templatefuncs/scripts/slimmenu.php

Code: Select all

$t.='<a href="?' . str_replace($cf['uri']['seperator'] . uenc($h[$ta[$i]]),'___',$u[$ta[$i]]) . '' . uenc(str_replace(' ','_',$slimmenuUriArray[$ta[$i]])) . '">';
by

Code: Select all

$t.='<a href="?' . str_replace($cf['uri']['seperator'] . uenc($h[$ta[$i]]),$cf['uri']['seperator'],$u[$ta[$i]]) . '' . str_replace(' ',$cf['uri']['seperator'],$slimmenuUriArray[$ta[$i]]) . '">';