Very big smarty object

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
steph_30
Forum Members
Forum Members
Posts: 22
Joined: Mon Apr 28, 2008 11:38 pm
Location: France

Very big smarty object

Post by steph_30 »

Hi all,

During some UDT developpement, I made a print_r($smarty) to see if could catch some information.

I saw a "very big" smarty object containing all the pages content (not only the one I'm on).

They are located in the $smarty->[_tpl_vars]->gCms[hrinstance][content].

I don't really understand why they are all in this object.
Is it because I use it in a UDT ?
Is there some configuration to switch ?

My CMS version is 1.6.1

Thanks for answer(s)


Stephane
Peciura

Re: Very big smarty object

Post by Peciura »

Smarty is way to big to get just "some" :) info. All you need is {get_template_vars}, {dump item=$entry}, {$entry|print_r}
steph_30
Forum Members
Forum Members
Posts: 22
Joined: Mon Apr 28, 2008 11:38 pm
Location: France

Re: Very big smarty object

Post by steph_30 »

Thanks Peciura for answer,

I didn't explore the get_template_vars functionnality. I will ...

But my question is only a "performance" one : if I can find all the pages content in this object, it means that there was one (or more) sql query made to do this.
Actually, I'm just making some tests on one very little page with 5 html lines in it, and I was surprised to see that all pages were retrieve from database, stored in smarty object, just to print out these 5 lines (I don't speak about template, modules ... that are retrieve, but really the content of all the pages).

If this object is stored in a cache, then 'no problem' ...


To be continued ?

Stephane
Post Reply

Return to “CMSMS Core”