Page published twice? Impossible, well, if you publish from parent page that is. Unless....
Despite implementing the "Shadow List" technique, if you select a page connected to "list_pages" and publish, the page still gets published twice because: Page builder tries to publish all page connections, if you happen to have the page connected in multiple locations with multiple publication packages, then yeah, multiple published location of the page. What do you asked? Luckily, with the aforementioned technique, though the page is published to 2 locations, all links still point to the mainlink location that the page is published from, so the page published from non-mainlink simply just sits on the server serving no purpose. "That is horrible for server space usage and maybe SEO!", you said. Create a publication target/package combo that publishes to local file system or a folder on web server that will get deleted. Apply the publication package to list_page. Problem solved On Jan 24, 1:45 pm, Jian Huang <[email protected]> wrote: > 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. > > <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.
