On pages without names like mailform, search...the content fo the homepage is displayed on the bottom of the page.
The problem is that it's not checked correctly.
Solution: Check for $f added to the content-function in file cms.php:
function content() {
global $s, $o, $c, $edit, $adm, $cf, $f;
if (!($edit && $adm) && $s > -1 && $f == '') return $o.preg_replace("/".$cf['scripting']['regexp']."/is", "", $c[$s]);
else return $o;
}
Then it's working correctly.
Content function doesn't work correctly
-
- Posts: 25
- Joined: Wed Feb 23, 2011 10:13 am
- Location: Karlsruhe
Re: Content function doesn't work correctly
Hi Thomas,
I am not quite sure, what 's your point. I guess you are talking about this "issue": If you name a page exactly like a function - "mailform" e.g., lowercase is important - you get a somewhat strange effect: CMSimple will display the mailform first, followed by your page's content.
Do you consider this as a bug? First of all, probably noone will name a page "mailform" (maybe "Mailform"). If someone really does, he must have something in his mind. You are right, probably he just wants to call the mailform()- and that is what happens with your fix. But we do not know if he wants to add some additional text or has something completely different in his mind. We should leave it to him.
Edit:Yesterday I posted some stupid code, that only works for the vistor - and turns off the WYSIWYG editor in edit mode. I deleted it now.
I guess we just have to accept some reserved words: We can't give a <h1>-page a lowercased name that is also used for an internal cmsimple function. IMHO that 's totally ok and no big limitation.
KR
Martin
I am not quite sure, what 's your point. I guess you are talking about this "issue": If you name a page exactly like a function - "mailform" e.g., lowercase is important - you get a somewhat strange effect: CMSimple will display the mailform first, followed by your page's content.
Do you consider this as a bug? First of all, probably noone will name a page "mailform" (maybe "Mailform"). If someone really does, he must have something in his mind. You are right, probably he just wants to call the mailform()- and that is what happens with your fix. But we do not know if he wants to add some additional text or has something completely different in his mind. We should leave it to him.
Edit:Yesterday I posted some stupid code, that only works for the vistor - and turns off the WYSIWYG editor in edit mode. I deleted it now.
I guess we just have to accept some reserved words: We can't give a <h1>-page a lowercased name that is also used for an internal cmsimple function. IMHO that 's totally ok and no big limitation.
KR
Martin