Continuing from previous thread.

Out of box functionality without preexecution and rendertag.
Generally referred to as the "Shadow List" trick

Have 2 lists in your template, say "list_pages" and "list_ref_pages".

Pages are connected to "list_pages" right?  Good, don't change that.

Reference "list_ref_pages" to "list_pages"

In your template code, loop "list_ref_pages" instead of "list_pages".
This tricks page builder into thinking those pages are referenced
instead of connected.

Code:
<div id="feature">
  <h2>Featured</h2>
  <!IoRangeList>
    <h3><a href="<%list_ref_pages%>"><%text_feature_title%></a></h3>
    <p><%img_feature%><%text_feature_summary%></p>
    <div class="button-grey">
      <div class="button-grey-text">
        <a href="<%list_ref_pages%>">More about <%text_feature_short
%></a>
      </div>
    </div>
  <!/IoRangeList>

  <!IoRangeNoRedDotMode>
  <!IoRangeRedDotMode>
  <!--
  <%list_pages%>
  --><!/IoRangeRedDotMode>
  <!/IoRangeNoRedDotMode>
</div>

You are still getting the page published twice?  Ok, explaination in
following post.

On Jan 24, 1:35 pm, Jian Huang <[email protected]> wrote:
> Hi gk,
>
> If you are on 10.1, from discussion 
> herehttp://groups.google.com/group/reddot-cms-users/browse_thread/thread/...
> from stefan.popp, you may try
>
> GetUrl(Bool:True)
>
> instead of
>
> GetUrl()
>
> So the final code should be (also, preexecution isn't neccessary in
> this case):
>
> <div id="feature">
>   <h2>Featured</h2>
>   <!IoRangeList>
>     <h3><a href="<%!! Context:Pages.GetPage(Guid:<%inf_PageGuid
> %>).GetUrl(Bool:True) !!%>"><%text_feature_title%></a></h3>
>     <p><%img_feature%><%text_feature_summary%></p>
>     <div class="button-grey">
>       <div class="button-grey-text">
>         <a href="<%!! Context:Pages.GetPage(Guid:<%inf_PageGuid
> %>).GetUrl(Bool:True) !!%>">More about <%text_feature_short%></a>
>       </div>
>     </div>
>         <!IoRangeNoRedDotMode>
>         <!IoRangeRedDotMode>
>         <!--
>         <%list_pages%>
>         --><!/IoRangeRedDotMode>
>         <!/IoRangeNoRedDotMode>
>   <!/IoRangeList>
> </div>
>
> Another out of box solution will be as a reply
>
> On Jan 23, 11:16 pm, gk <[email protected]> wrote:
>
> > Thank you. I didn't realise that the info_PageGuid placeholder didn't
> > exist on the referenced page but I've corrected that.
>
> > I've changed all the rest of the code as advised but the referenced
> > page is still publishing to two places.
>
> > My code now looks like:
>
> > <div id="feature">
> >   <h2>Featured</h2>
> >   <!IoRangeList>
> >     <!IoRangePreExecute>
> >     <h3><a href="<%!! Context:Pages.GetPage(Guid:<%inf_PageGuid
> > %>).GetUrl() !!%>"><%text_feature_title%></a></h3>
> >     <p><%img_feature%><%text_feature_summary%></p>
> >     <div class="button-grey">
> >       <div class="button-grey-text">
> >         <a href="<%!! Context:Pages.GetPage(Guid:<%inf_PageGuid
> > %>).GetUrl() !!%>">More about <%text_feature_short%></a>
> >       </div>
> >     </div>
> >       <!IoRangeNoRedDotMode><!IoRangeRedDotMode><!--
> >                 'treat the link as reference not as link to avoid
> > duplicate publishing
> >                 <%=Replace("<%list_pages%>","islink=2","islink=10")%>
> >       --><!/IoRangeRedDotMode><!/IoRangeNoRedDotMode>
> > <!/IoRangePreExecute>
> >   <!/IoRangeList>
> > </div>

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to