Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2014-06-13 16:24:17

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Little doubt

In order to list /articles/categories/sections, is smarter (with reference to server load) a conditional expression, or a nested category/section like this:

<txp:category_list parent=’<txp:section />’ exclude=’<txp:section />’ wraptag=“p” break=”“>
</txp.category_list>

Although I like to profit such nested expressions to get more compact scripts, it looks to me (I don’t know if it’s wrong) that in this case are more queries in a same moment.
Thanks

Last edited by Bongo-man (2014-06-13 16:24:48)

Offline

#2 2014-06-13 16:31:24

milosevic
Member
From: Madrid, Spain
Registered: 2005-09-19
Posts: 390

Re: Little doubt

If you activate debug mode in preferences you can see the time elapsed and number of querys done per page as an HTML comment at the end of every single served page. Try both ways and compare.

Anyway, more querys combined with a cache plugin can give you the best of both options: smart coding and low server work.

Last edited by milosevic (2014-06-13 16:34:13)


<txp:rocks/>

Offline

#3 2014-06-13 16:47:02

Bongo-man
Member
Registered: 2009-03-18
Posts: 243

Re: Little doubt

OK, a cache plugin may be a good solution.
Thanks.

p.s. when I update the page codes do I need to delete the cache?

Last edited by Bongo-man (2014-06-13 16:50:21)

Offline

Board footer

Powered by FluxBB