UDT stopped working after upgrade to CMSMS Version: 2.1.1

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

UDT stopped working after upgrade to CMSMS Version: 2.1.1

Post by naturelab »

I use this UDT to pull content from other pages. It has stopped working completely in 2.x.x. Any pointers ?

Code: Select all

$alias = isset($params['alias']) ? $params['alias'] : '';
$box = isset($params['box']) ? $params['box'] : '';
global $gCms;
$cgsimple = $smarty->get_template_vars('cgsimple');


$page_content = $cgsimple->get_page_content( $alias , $box);
echo $page_content;
I use it like this :-

Code: Select all

{Gallery dir={pull_content alias=$child.alias box='Gallery'}
or this:-

Code: Select all

{{pull_content alias=$child.alias}|cms_html_entity_decode|trim|strip_tags|summarize:10}
*********************

Code: Select all

Cms Version: 2.1.1

Installed Modules:

    AdminSearch: 1.0
    CMSContentManager: 1.1
    DesignManager: 1.1.1
    FileManager: 1.5.2
    MenuManager: 1.50.2
    MicroTiny: 2.0.2
    ModuleManager: 2.0.1
    Navigator: 1.0.2
    News: 2.50.3
    Search: 1.50.2
    Gallery: 2.0.3
    CGExtensions: 1.51
    CGSimpleSmarty: 2.0.2
    CGContentUtils: 2.1
    JQueryTools: 1.3.8
    CGBlog: 1.13.3
    CGSnapshot: 1.0
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT stoped working after upgrade to Cms Version: 2.1.1

Post by calguy1000 »

The CGSimpleSmarty library changed for 2.x thus breaking it. That change is well documented.

But there is no need for that UDT any more.

see the 'page_attr' plugin distributed with 2.x
you can retrieve all of that information without using CGSimple.
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.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by naturelab »

Thankyou for the quick reply. I will look into it now. Appreciate your time
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by naturelab »

Ah, but I need to use it in this contex:-

Code: Select all

{cgsimple::get_children('',0,'children')}
{if count($children)}
   {foreach from=$children item='child'}
      {if $child.show_in_menu}
      {Gallery dir={pull_content alias=$child.alias box='Gallery'}
      {/if}
   {/foreach}
{/if}
The page_attr tag has a key that can be used for the block name
key [required] The key to return the attribute of.
The key can either be a block name, or from a set of standard properties associated with a content page.
But I don't understand how to access content from another page, other than the current one ?

Code: Select all

 {Gallery dir={page_attr key='Gallery' }
Where would the

Code: Select all

alias=$child.alias
bit go ?
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by velden »

Looks like something you can do from within a Menu template (Navigator)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by calguy1000 »

But I don't understand how to access content from another page, other than the current one ?
From the help:
- (optional) page (int|string) - An optional page id or alias to fetch the content from. If not specified, the current page is assumed.
- key [required] The key to return the attribute of.
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.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by calguy1000 »

Code: Select all

{$children=cgsimple::get_children()}
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.
naturelab
Forum Members
Forum Members
Posts: 169
Joined: Thu Oct 15, 2009 11:11 am

Re: UDT stopped working after upgrade to CMSMS Version: 2.1.

Post by naturelab »

Gamechanger ! :) cheers
Post Reply

Return to “Modules/Add-Ons”