Include content from a variant

20 views
Skip to first unread message

VegeJuice

unread,
Nov 20, 2011, 10:14:08 PM11/20/11
to reddot-c...@googlegroups.com
I have a page that uses a default and a custom variant. I need to include (embed) the content of the custom variant into the default variant. Any ideas?


Jian Huang

unread,
Nov 22, 2011, 10:45:02 AM11/22/11
to RedDot CMS Users
Hi VegeJuice,

There are two solutions:

1. JQuery

<div id="stuff-from-other-side"></div>
<script>
$.get("<%inf_custom_variant_current_page_url%>", function(data){
$("#stuff-from-other-side").append(data);
});
</script>

2. Server side include that runs onced published to the web server
ASP Code:
<div id="stuff-from-other-side">
<!--#include file="<%inf_custom_variant_current_page_url%>"-->
</div>


Please note that <%inf_custom_variant_current_page_url%> is an info
placeholder with setting of current page url and project variant of
custom.

-Jian

VegeJuice

unread,
Nov 23, 2011, 12:01:58 AM11/23/11
to reddot-c...@googlegroups.com
Thx Jian, I'd given up trying for a local variation of option 2 and had used 1. Will use the server execute approach...
Reply all
Reply to author
Forward
0 new messages