- Posts: 3856
- Thank you received: 515
Nested modules
- Demis [Fox-Labs]
-
Topic Author
- Offline
Less
More
09 Dec 2013 00:07 - 25 Oct 2017 22:39 #1
by Demis [Fox-Labs]
Nested modules was created by Demis [Fox-Labs]
This documentation covers the situation where a module (often a Custom HTML module) calls in turn a Fox Contact module, by using plugins such as loadposition or NoNumber Modules Anywhere.
Usually you shouldn't need to include a Fox Contact module within another module like Russian dolls, because probably there is an easier way to achieve the result you have in mind.
However if you can't or don't want to adopt a cleaner way, you need an additional setting in order to get Fox Contact working.
1. Enable "Options" > "Prepare content" under module preferences as shown below, which causes Joomla to run all the needed plugins on the module content before rendering the page
2. Disable "Advanced" > "Caching" under module preferences as shown below, which causes Joomla to turn off cache for this module, or the Fox Contact's code will not be called in favour of a static, cached content.
3. Disable the plugin "Content - Email Cloaking" as shown below, or the email address will be cloaked on page reload in case of fields with invalid values.
Why I can't use the cache system with my forms?
The cache mechanism is based on the assumption that the output of a module or a page, does not change during the time.
Under this conditions, Joomla saves a lot of time by pulling out of the hat the final output, instead of running the same PHP code again and again, which would waste time to produce always the same result.
To make an example in the real world, is't as you had a restaurant. You want to save your time while preparing the bill, so under the assumption that all your customers eat the same things, you decide to offer the lunch for a fixed price. Everyone eat the same, and pay the same. You have just enabled your cache system.
A user that submits a form on your site, is like a customer that eats like a pig at your restaurant.
Making his bill is time consuming for you, but certainly you can't offer him a flat price.
In other words: caching a form prevents any interaction with it, and shows to everyone the same output.
Since a form, on the contrary, is something highly interactive, you have to pay a high bill in computational power.
Can I use the plugin "System - Page Cache" in order to cache all the pages of my website without affecting Fox Contact menu items?
Fox Contact, when created as a Menu Item, automatically inhibits the "System - Page Cache" plugin limited to its own menu item, without affecting all the other pages on your site. There is nothing to configure or worry about.
What was said, applies to the "System - Page Cache" plugin bundled with Joomla. If you are using a third party cache plugin, Fox Contact doesn't know the correct way to inhibit it.
Can I use the "Cache" feature under "Joomla Global Configuration" in order to cache all the modules of my website without affecting Fox Contact modules?
Fox Contact, when created as a Module, automatically inhibits the "Module Cache" limited to its own module, without affecting the cache mechanism for all the other modules on your site. Once again, there is nothing to configure or worry about.
What was said applies to a Fox Contact module loaded using a standard Joomla module position. If you load the module through a plugin, or a third party extension, any use of the cache feature depends on the plugin or the specific extension which is loading the module.
Usually you shouldn't need to include a Fox Contact module within another module like Russian dolls, because probably there is an easier way to achieve the result you have in mind.
However if you can't or don't want to adopt a cleaner way, you need an additional setting in order to get Fox Contact working.
1. Enable "Options" > "Prepare content" under module preferences as shown below, which causes Joomla to run all the needed plugins on the module content before rendering the page
2. Disable "Advanced" > "Caching" under module preferences as shown below, which causes Joomla to turn off cache for this module, or the Fox Contact's code will not be called in favour of a static, cached content.
3. Disable the plugin "Content - Email Cloaking" as shown below, or the email address will be cloaked on page reload in case of fields with invalid values.
Why I can't use the cache system with my forms?
The cache mechanism is based on the assumption that the output of a module or a page, does not change during the time.
Under this conditions, Joomla saves a lot of time by pulling out of the hat the final output, instead of running the same PHP code again and again, which would waste time to produce always the same result.
To make an example in the real world, is't as you had a restaurant. You want to save your time while preparing the bill, so under the assumption that all your customers eat the same things, you decide to offer the lunch for a fixed price. Everyone eat the same, and pay the same. You have just enabled your cache system.
A user that submits a form on your site, is like a customer that eats like a pig at your restaurant.
Making his bill is time consuming for you, but certainly you can't offer him a flat price.
In other words: caching a form prevents any interaction with it, and shows to everyone the same output.
Since a form, on the contrary, is something highly interactive, you have to pay a high bill in computational power.
Can I use the plugin "System - Page Cache" in order to cache all the pages of my website without affecting Fox Contact menu items?
Fox Contact, when created as a Menu Item, automatically inhibits the "System - Page Cache" plugin limited to its own menu item, without affecting all the other pages on your site. There is nothing to configure or worry about.
What was said, applies to the "System - Page Cache" plugin bundled with Joomla. If you are using a third party cache plugin, Fox Contact doesn't know the correct way to inhibit it.
Can I use the "Cache" feature under "Joomla Global Configuration" in order to cache all the modules of my website without affecting Fox Contact modules?
Fox Contact, when created as a Module, automatically inhibits the "Module Cache" limited to its own module, without affecting the cache mechanism for all the other modules on your site. Once again, there is nothing to configure or worry about.
What was said applies to a Fox Contact module loaded using a standard Joomla module position. If you load the module through a plugin, or a third party extension, any use of the cache feature depends on the plugin or the specific extension which is loading the module.
The following user(s) said Thank You: nhhuayt
Please Log in or Create an account to join the conversation.