start page + next = start page ???

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
Post Reply
svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

start page + next = start page ???

Post by svasti » Mon May 19, 2014 3:10 pm

Just noticed a strange behavior:

If you are on the start page "www.mydomain.xx" and click "next page" you will not be lead to the next page but you remain on the start page, however now it's "www.mydomain.xx/?Start". Would be nicer to go to the second page right away.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: start page + next = start page ???

Post by cmb » Mon May 19, 2014 3:43 pm

Hm, I can't reproduce this behavior; see http://www.cmsimple-xh.org/, where the next link works as expected.

Or do you mean that happens only when logged in as administrator? In this case you are not on any page, when you request the domain (resp. CMSimple root), so the next link's behavior is somewhat consistent. However, IMHO it is utmost nonsense to get the notice "No page selected" in admin mode--unfortunately, that can't be easily fixed, see http://cmsimpleforum.com/viewtopic.php?f=29&t=5142.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1659
Joined: Wed Dec 17, 2008 5:08 pm

Re: start page + next = start page ???

Post by svasti » Mon May 19, 2014 4:45 pm

cmb wrote:see http://www.cmsimple-xh.org/, where the next link works as expected.
Yeah, works as it should,
But try http://demo.cmsimple-xh.dk/ with template fluidwhite,
And it's the same thing with oldnema's template responsivehtml.
When selecting any language, the start page will be shown, but not highlighted in the menu, and the bread crumbs is also empty.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: start page + next = start page ???

Post by cmb » Mon May 19, 2014 5:12 pm

svasti wrote:When selecting any language, the start page will be shown, but not highlighted in the menu, and the bread crumbs is also empty.
That is caused by Templateswitch. This plugin manipulates the global $o, and the latter is checked whether to adjust $s. As $o already contains output, $s stays -1, and there were go. See also http://cmsimpleforum.com/viewtopic.php? ... 142#p30523.

On one hand we have to get the $s problem fixed in the not too distant future. On the other we might have to replace Templateswitch with something else (additionally to the $s problem, Templateswitch still sends a POST request to switch the template, what's neither good nor necessary since CMSimple_XH 1.6).
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: start page + next = start page ???

Post by cmb » Tue May 20, 2014 10:15 pm

cmb wrote:On the other we might have to replace Templateswitch with something else
Hm, that will not really help wrt. to the wrong $s. Appending to $o is the only way to output something on all pages without the need to modify the template (and exactly that's what desired when setting $plugin_cf['templateswitch']['show_always_selectbox']="true";).

An alternative is to manipulate $c[$s] (or $c[$pd_s]) (in view mode only), but that will work only for real pages, but not for special pages (sitemap, mailform, plugin administration etc.) Furthermore this could have undesired side-effects wrt. CMSImple scripting on the page.

So either one eschews this possibility, or one uses some more or less dirty hacks. One of the dirtiest hacks might be the "correction" of $s when the URL doesn't contain a query string. Another hack would be to inject the desired output via JavaScript (I regard this as hack, as it requires JavaScript). Yet another hack would be to use $c[$s] for $s>=0 and fall back to $o otherwise.

When deciding what to do, one should be aware that manipulations of $o and $c[$s] will be reflected in the print view, what may be desired or not (of course it is possible to not to manipulate when in print mode).

We might consider offering the possibility to manipulate the content(), but somehow this seems to be just another hack.
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply