Search code examples
expressionengine

{exp:addon:method url=”{site_url}pdf/{segment_1}”} translates url to {site_url}pdf/index in the method


seems there is some problems with global variables parsing. So

{exp:addon:method url="{site_url}pdf/{segment_1}"}  

pass to method {site_url}pdf/index, so {site_url} - not parsed and {segment_1} - parsed. How to make it parse all global variables?

Thanks


Solution

  • You're dealing with a parse order issue here. First steps to understanding parse order can be found here and here.

    There are several ways to address this issue, I would recommend adding a global config variable that contains whatever the site url is. See: http://expressionengine.com/user_guide/templates/globals/user_defined.html