Hi Hubert,

I assume you want to inherit the header/banner.  The best practice
method is not to inherit the entire con_header (many problems, in
short, please don't), instead, inherit the changable piece of the
header

The following code is done by server side JScript, you can convert it
to VBScript, or C#

<!IoRangePreExecute>
<%
    // Initialize Variables
    var inherited_image = null;
    var current_image = null;
    <reddot:cms>
        <!-- Loop over this page each ancestor page, working down the
tree -->
        <foreach itemname="Index"
object="Context:Indexes.GetIndexByPage(Context:CurrentMasterPage).GetPathArray()">
            <htmltext>
                // Retrieve the url of the image set on that page
                current_image = "<%!!
Store:Index.Page.Elements.GetElement(img_top_banner).GetHtml() !!%>";
                // If an image was set
                if (current_image != "")
                {
                    // Set the inherited image to the current image
                    inherited_image = current_image;
                }
            </htmltext>
        </foreach>
    </reddot:cms>
%>

<!-- If an image was found on this page or in the ancestor pages then
display the image -->
<% if (inherited_image != null) { %>
    <img src="<%= inherited_image %>" width="170" />
<% } %>
<!/IoRangePreExecute>


Now, there is another really good method and requires minimum RQL, use
javascript to check if con_header is empty, if empty, use AJAX to run
RQL (so page builder and RQL runs at parallel/multithread for speed)
to reference current con_header to parent's con_header.


On Feb 28, 7:01 am, Hubert <[email protected]> wrote:
> Hi all,
>
> 1/ Is there any chance of geting the full content of the pages
> connected to the containter ? not haveing to get the content of each
> element of the page connected to the container
>
> 2/ Any chance of doing it not useing RQL ?
>
> Quick overwiev of the problem :
>
> I have a page with the con_containter, and i would like to make it
> inherint the content of the parent page con_container if the user
> haven't created/connected any page to tht page con_container
>
> i have the base setupy ready:
>
> <reddot:cms>
> <if>
>     <query valuea="Context:CurrentIndex.Id" operator="=="
> valueb="Context:LastIndex.Id">
>         <foreach itemname="Item"
> object="Context:CurrentIndex.Parent.Page.Elements.GetElement(con_header).Value">
>             <htmltext>??? problem here ???</htmltext>
>         </foreach>
>     </query>
>     <query type="else">
>         <htmltext>
>             <navigation:nextlevel>
>         </htmltext>
>     </query>
> </if>
> </reddot:cms>

-- 
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