[SOLVED] After CMSMS 1.10 upgrade pages are broken
[SOLVED] After CMSMS 1.10 upgrade pages are broken
I used this construction in my template to access extra options of my pages: $content_obj->mProperties->mPropertyValues.extra1.
It looks like its not supported in cmsms 1.10. I get this error: Fatal error: Cannot access protected property Content::$mProperties in ....
As the result pages are not displaying correctly.
What do I use instead?
It looks like its not supported in cmsms 1.10. I get this error: Fatal error: Cannot access protected property Content::$mProperties in ....
As the result pages are not displaying correctly.
What do I use instead?
Last edited by ofrost on Fri Oct 28, 2011 5:33 pm, edited 1 time in total.
Re: After CMSMS 1.10 upgrade pages are not displaying correc
Hi,
I suggest you read through the CMSMS 1.10 API docs.
I think this might be what you're looking for:Hope this helps,
fredp
EDIT:
Also try searching the forum for related postings. E.g:
http://forum.cmsmadesimple.org/viewtopi ... =2&t=49083
I suggest you read through the CMSMS 1.10 API docs.
I think this might be what you're looking for:
Code: Select all
$xtra1 = $content->GetPropertyValue('extra1');
fredp
EDIT:
Also try searching the forum for related postings. E.g:
http://forum.cmsmadesimple.org/viewtopi ... =2&t=49083
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
- Abraham Lincoln
Re: After CMSMS 1.10 upgrade pages are not displaying correc
Thank you Fred.
This string moves me further
but now I get this error
Any ideas what they mean?
This string moves me further
Code: Select all
{if FALSE!==$content_obj->GetPropertyValue('extra1')|strpos:´slider´}
Code: Select all
Notice: Undefined index: content in /var/www/virtual/mysite/new/htdocs/tmp/templates_c/%%07^075^0753AFA5%%template%3A29.php on line 150
Fatal error: Call to a member function GetPropertyValue() on a non-object in /var/www/virtual/mysite/new/htdocs/tmp/templates_c/%%07^075^0753AFA5%%template%3A29.php on line 150
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: After CMSMS 1.10 upgrade pages are not displaying correc
it's amazing the steps people will go to to NOT read the help, documentation, and list of available tags from within their own install.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: After CMSMS 1.10 upgrade pages are not displaying correc
First of all thank you for your work and things you do of cmsms.
It might sound funny for you calguy, but even list of "thing we have broken" in release notes doesn't make much sense for me. I'm not programmer and its a bit hard for me to get things working now.
This construction used to work fine in 1.9.4.3 and I was advised with this solution on IRC channel. So I'm not very competent in this things.
My goal is to use only one template for three different page layouts and get my site working with 1.10.
It might sound funny for you calguy, but even list of "thing we have broken" in release notes doesn't make much sense for me. I'm not programmer and its a bit hard for me to get things working now.
This construction used to work fine in 1.9.4.3 and I was advised with this solution on IRC channel. So I'm not very competent in this things.
My goal is to use only one template for three different page layouts and get my site working with 1.10.
Re: After CMSMS 1.10 upgrade pages are not displaying correc
@ofrost
Oops, sorry, I misread your OP last night. If you want this in a template, Calguy1000 is right, just use the {page_attr} tag that comes with the installation. See help on the Extensions » Tags Admin page.
Oops, sorry, I misread your OP last night. If you want this in a template, Calguy1000 is right, just use the {page_attr} tag that comes with the installation. See help on the Extensions » Tags Admin page.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
- Abraham Lincoln
Re: After CMSMS 1.10 upgrade pages are not displaying correc
So here is solutions in my case.
I have used extra1 parameter in page's options to display different page layouts using only one template.
After upgrade to 1.10 solution I have used before didn't work anymore. Here it is:
I couldn't use simple construction {is $extra1 == 'slider'} because on some pages I had more than one word in extra1 field like 'slider' and 'notitle'.
Calguy pointed that their solution of the box. Just read help. Well there is much help for use of {page_attr} tag and no examples at all.
So with help of people from IRC channel solution in my case for 1.10 looks like this:
if I want to display slider.
I have used extra1 parameter in page's options to display different page layouts using only one template.
After upgrade to 1.10 solution I have used before didn't work anymore. Here it is:
Code: Select all
{if FALSE!==$content_obj->mProperties->mPropertyValues.extra1|strpos:'slider'}...{else}...{/if}
Calguy pointed that their solution of the box. Just read help. Well there is much help for use of {page_attr} tag and no examples at all.
So with help of people from IRC channel solution in my case for 1.10 looks like this:
Code: Select all
{page_attr key='extra1' assign='extra1'}
{if $extra1|strstr:'slider' != ''}...{else}...{/if}
Re: [SOLVED] After CMSMS 1.10 upgrade pages are broken
There are 3 'extra' fields, why not use each one for each call instead of trying to put them all in one?...
Re: [SOLVED] After CMSMS 1.10 upgrade pages are broken
I need more than three. So there must be two conditions in one extra field.
And it was done that way from the beginning. It's hard to make it different. Too many pages.
And it was done that way from the beginning. It's hard to make it different. Too many pages.