cms_action_url

We need your assistance to make the documentation accurate, user friendly and understandable. Therefore we welcome any tips or suggestions regarding documentation. Thank you in advance for your contribution.

However, we will not respond to technical support questions submitted using this form. If you are having difficulty with CMSMS and cannot find the solution on this website, please submit your question appropriately on our support forum at: http://forum.cmsmadesimple.org. Please remember to follow the forum rules when posting.

CMS Made Simple™ Partner



   Purpose

This is a Smarty plugin useful for generating a URL to a module action. This plugin is useful for module developers who are generating links (either for Ajax or or in the admin interface) to perform different functionality or display different data.

   Parameters

  • module - (optional) - The module name to generate a URL for. This parameter is not necessary if generating a URL from within a module action to an action within the same module.
  • action - (required) - The action name to generate a URL to.
  • returnid - (optional) - The integer pageid to display the results of the action in. This parameter is not necessary if the action is to be displayed on the current page, or if the URL is to an admin action from within an admin action.
  • mid - (optional) - The module action id. This defaults to "m1_" for admin actions, and "cntnt01" for frontend actions.
  • forjs - (optional) - An optional integer indicating that the generated URL should be suitable for use in JavaScript.
  • assign - (optional) - Assign the output URL to the named smarty variable.

   Example

{cms_action_url module=News action=defaultadmin}