• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 
Author Message
 Post subject: [SOLVED] After CMSMS 1.10 upgrade pages are broken
PostPosted: Thu Oct 27, 2011 7:57 am 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 8:52 pm
Posts: 47
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?


Last edited by ofrost on Fri Oct 28, 2011 5:33 pm, edited 1 time in total.

Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Thu Oct 27, 2011 8:37 am 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Jul 27, 2008 1:36 am
Posts: 218
Location: USA
Hi,

I suggest you read through the CMSMS 1.10 API docs.

I think this might be what you're looking for:
\$1:
$xtra1 = $content->GetPropertyValue('extra1');
Hope this helps,
fredp

EDIT:
Also try searching the forum for related postings. E.g:
http://forum.cmsmadesimple.org/viewtopic.php?f=2&t=49083

_________________
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Thu Oct 27, 2011 1:02 pm 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 8:52 pm
Posts: 47
Thank you Fred.
This string moves me further
\$1:
{if FALSE!==$content_obj->GetPropertyValue('extra1')|strpos:´slider´}

but now I get this error

\$1:
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


Any ideas what they mean?


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Thu Oct 27, 2011 2:17 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Tue Oct 19, 2004 6:44 pm
Posts: 8172
Location: Fernie British Columbia, Canada
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Thu Oct 27, 2011 2:55 pm 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 8:52 pm
Posts: 47
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Thu Oct 27, 2011 8:36 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Sun Jul 27, 2008 1:36 am
Posts: 218
Location: USA
@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.

_________________
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: After CMSMS 1.10 upgrade pages are not displaying correc
PostPosted: Fri Oct 28, 2011 5:32 pm 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 8:52 pm
Posts: 47
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:
\$1:
{if FALSE!==$content_obj->mProperties->mPropertyValues.extra1|strpos:'slider'}...{else}...{/if}


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:

\$1:
  {page_attr key='extra1' assign='extra1'}
   {if $extra1|strstr:'slider' != ''}...{else}...{/if}


if I want to display slider.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [SOLVED] After CMSMS 1.10 upgrade pages are broken
PostPosted: Fri Oct 28, 2011 5:53 pm 
Offline
Administrator
Administrator
User avatar

Joined: Thu Mar 09, 2006 5:32 am
Posts: 12672
Location: Arizona
There are 3 'extra' fields, why not use each one for each call instead of trying to put them all in one?...

_________________
Check ver. CMSMS, PHP, server OS, in System Information page.
Default content http://multiintech.com/defaultcontent/
People are Wonderful
Business is Great
Life is Terrific
Ever wonder what happened to the Album module? Well it is alive and well.
http://album.multiintech.com/
$1


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: [SOLVED] After CMSMS 1.10 upgrade pages are broken
PostPosted: Mon Oct 31, 2011 9:09 am 
Offline
Forum Members
Forum Members

Joined: Tue May 01, 2007 8:52 pm
Posts: 47
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.


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Hosting Nation - Managed CMSMS Hosting