我需要在 URL 中传递 2 个 URL 参数。该 URL 源自电子邮件,用户将单击将他们定向到我的站点的链接。第一个参数触发页面上的脚本,第二个参数用于我的 CMS 将从参数呈现的模块。
第一个参数是:(message=1
此参数触发javascript)
第二个参数是:(name={tag_recipientfirstname}
我的 CMS 会渲染模块)
第一个调用的脚本如下所示:
<script type="text/javascript">
var $j = jQuery.noConflict();
$j(document).ready(function() {
var url = window.location.href;
url = url.toLowerCase();
if (url.indexOf('message=1') != -1) {
$j("a.message").colorbox({
open:true
});
}
$j("a.message").colorbox(); //not related to URL parameter
});
</script>
第二个参数在页面上用作:
<div>
<p>{ module_url,name} (again CMS will render this module)</p>
</div>
编辑
我意识到我遗漏了几件事:
第一:我如何传递这两个参数,以便它们都能按上面列出的方式工作?
我使用的 CMS 是 Business Catalyst。