|
|
Due to the volume of spam happening on our forums, posting is now restricted to verified members only. If you're not verified, drop us a note with your username.
|
|
Home > FlexCMS Support Forum > User Help > General Support Requests > RIGHT BLOCKS
FlexCMS Support Forum
RIGHT BLOCKS Started August 8, 2006 @ 8:22am by cberks
|
Post Message |
|
|
RIGHT BLOCKS | August 8, 2006 @ 8:22am | Is it posible to have the right blocks ON for some of the user defined pages and OFF for others?
Or even dynamically switch template for some pages?
Regards, Chris |
|
|
|
|
|
|
| |
DCSun Administrator
Posts: 625 |
|
|
| August 8, 2006 @ 10:16am | The ability to define which blocks appear on which pages is a feature that's been requested by a few others as well, and will be available in a future version.
Right now you can do some tricks to turn blocks on and off, but it requires a bit of PHP knowledge, and only works on custom blocks, not those created with one of the wizards.
Essentially how it works is that empty blocks aren't displayed, so what you do is just control whether the block contents are added or not based on the page being viewed.
As you may have read elsewhere on the forum, you can access the query string arguments with the variables $Arguments1, $Arguments2, etc. The first is the module, such as 'forum' or 'guestbook', or it could also be 'pages' for custom pages. Note that the index page is actually 'pages/index' even when there's nothing in the query string.
So using that, you can easily add an IF statement to the top of your block to control whether it gets added to the page. This example would turn the block ON only on when browsing the store:
Code
if ($Arguments1 == 'store') {
print 'block contents';
} |
|
Hope that helps!
David
FlexCMS v3.2 Has Been Released! |
|
|
|
|
|
|
|
|
|
| MEMBERS
|
|
|