Could anyone tell me in what order the individual parts of the site get rendered, i.e., the user-defined tags, global content blocks, main content, etc.
Also, is it possible to create variables to share across blocks or tags? A typical strategy I employ when making non cmsms websites is to have a php switch in the header which sets a bunch of variables for each particular page, then at a certain place in the layout, I might call for $rightPanel and that might be different depending on which page I'm on. I'm wondering if this is possible.
sloe
render/compiling order
Re: render/compiling order
Sounds like you may need to use diff. templates for diff. pages and/or Global Content Blocks which you can write once and use on diff. pages.
-
sloecoach
Re: render/compiling order
Did a little testing and found what I was looking for thanks to your suggestion. User Defined Tags and Global Content Blocks can both be used in the template (obviously) and the content (which i didn't realize). Also found you can use the UDTs in the GCBs.mark wrote: Sounds like you may need to use diff. templates for diff. pages and/or Global Content Blocks which you can write once and use on diff. pages.
This makes my problem much easier. As you suggested, I will create a GCB for each part of the site and dole them out in the conent pages.
Thanks.
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: render/compiling order
you can just create global php variables in one user defined tag
and then use them again in another....
see the 'global' keyword in the php docs.
and then use them again in another....
see the 'global' keyword in the php docs.
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.
-
sloecoach
Re: render/compiling order
thanks. I thought I had tried that. and I had, but played around some and this is what I found. If I create two UDTs say:
I can put the first at the top of a template and the second one at the bottom. and it will echo "hello world". If you omit either of the:
lines, it won't work (at least it didn't for me).
This is just what I was looking for.
Code: Select all
global $myVar;
$myVar = "hello world";
Code: Select all
global $myVar;
echo $myVar;
Code: Select all
global $myVar;This is just what I was looking for.

