Jahia Dev Forum > Using randomContainer...

0 (0 Good)
0 (0 Bad)

Using randomContainer with absoluteContainerList

by  mpjulien »  2011/06/07 20:34

Using randomContainer with absoluteContainerList doesn't seem to be working.

Here is my code :


<template:randomContainer displayedContainer="3">

    <template:absoluteContainerList name="campaignbox" pageKey="campaignbox">

        <template:container id="campBox">

      <template:field name="campaignboxTitle" />

      </br>

      </br>

   </template:container>

    </template:absoluteContainerList>

</template:randomContainer>

The resulting page is not as expected and is not stable.

Once every few times, no item will be displayed. Other times, all items of the container will be displayed even if their number is above 3 (the limit that I have set in for the randomContainer).

If I remove the randomContainer, it displays correctly all the elements:

<template:absoluteContainerList name="campaignbox" pageKey="campaignbox">

    <template:container id="campBox">

        <template:field name="campaignboxTitle" />

   </br>

   </br>

    </template:container>

</template:absoluteContainerList>

I looked into all the provided templates in Jahia distro. This use of both tags has never been done or documented.

In case what I'm trying to achieve is not clear. I want to access a container located in a different template/page. This does work using absoluteContainerList. However, I do not want to display all the elements of that container. Instead, I want to be able to randomly display a fixed number of elements.

 

Thanks in advance for your help.

  • Using randomContainer with absoluteContainerList
    2011/07/08 12:57

    mpjulien <p> Using randomContainer with absoluteContainerList doesn&#39;t seem to be working.<br /> <br /> Here is my code :</p> <br /> <p> <title></title> </p> <pre> &lt;template:randomContainer displayedContainer=&quot;3&quot;&gt; &lt;template:absoluteContainerList name=&quot;campaignbox&quot; pageKey=&quot;campaignbox&quot;&gt; &lt;template:container id=&quot;campBox&quot;&gt; &lt;template:field name=&quot;campaignboxTitle&quot; /&gt; &lt;/br&gt; &lt;/br&gt; &lt;/template:container&gt; &lt;/template:absoluteContainerList&gt; &lt;/template:randomContainer&gt;</pre> <p> The resulting page is not as expected and is not stable.</p> <p> Once every few times, no item will be displayed. Other times, all items of the container will be displayed even if their number is above 3 (the limit that I have set in for the randomContainer).</p> <p> If I remove the randomContainer, it displays correctly all the elements:</p> <pre> &lt;template:absoluteContainerList name=&quot;campaignbox&quot; pageKey=&quot;campaignbox&quot;&gt; &lt;template:container id=&quot;campBox&quot;&gt; &lt;template:field name=&quot;campaignboxTitle&quot; /&gt; &lt;/br&gt; &lt;/br&gt; &lt;/template:container&gt; &lt;/template:absoluteContainerList&gt;</pre> <p> I looked into all the provided templates in Jahia distro. This use of both tags has never been done or documented.</p> <p> In case what I&#39;m trying to achieve is not clear. I want to access a container located in a different template/page. This does work using absoluteContainerList. However, I do not want to display all the elements of that container. Instead, I want to be able to randomly display a fixed number of elements.</p> <p> &nbsp;</p> <p> Thanks in advance for your help.</p>

  • Number of messages  1
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Using randomContainer with absoluteContainerList

    by  trenaud »  2011/06/07 20:34

    We created a Jira for this issue which seems indeed to be a product bug:

    http://jira.jahia.org/browse/JAHIA-4861

    You can follow it to see when/how it will be fixed.

    Thanks for reporting,

    Tristan
  • Re: Using randomContainer with absoluteContainerList
    2011/06/07 20:34

    trenaud We created a Jira for this issue which seems indeed to be a product bug:<br/><br/><!-- m --><a class="postlink" href="http://jira.jahia.org/browse/JAHIA-4861">http://jira.jahia.org/browse/JAHIA-4861</a><!-- m --><br/><br/>You can follow it to see when/how it will be fixed.<br/><br/>Thanks for reporting,<br/><br/>Tristan

  • Number of messages  71
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Using randomContainer with absoluteContainerList

    by  theklem »  2011/06/07 20:34

    Hello,

    just to inform you that this bug ticket should be treated by the RampD team in the next 8 days.
  • Re: Using randomContainer with absoluteContainerList
    2011/06/07 20:34

    theklem Hello,<br/><br/>just to inform you that this bug ticket should be treated by the RampD team in the next 8 days.

  • Number of messages  85
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: Using randomContainer with absoluteContainerList

    by  theklem »  2011/06/07 20:34

    Hello,

    as I said in my previous post, we've done the fix for the random tag problem (broken by a previous upgrade of the cache layer, in fact).
    unfortunately this fix did not arrived early enough to be part of the 6SP1 released yesterday (we finished to test it yesterday, after the end of tests for the SP1).

    There are two solutions to benefit from this fix:
    - wait a bit for the next hotfix that will be published
    - create a JIRA ticket in your Jira space if you have a support contract, and then we will give you instantly the class that has been corrected (one singel class, no dependencies).

    Clément.

  • Re: Using randomContainer with absoluteContainerList
    2011/07/08 12:58

    theklem <p> Hello,<br /> <br /> as I said in my previous post, we&#39;ve done the fix for the random tag problem (broken by a previous upgrade of the cache layer, in fact).<br /> unfortunately this fix did not arrived early enough to be part of the 6SP1 released yesterday (we finished to test it yesterday, after the end of tests for the SP1).<br /> <br /> There are two solutions to benefit from this fix:<br /> - wait a bit for the next hotfix that will be published<br /> - create a JIRA ticket in your Jira space if you have a support contract, and then we will give you instantly the class that has been corrected (one singel class, no dependencies).<br /> <br /> Cl&eacute;ment.</p>

  • Number of messages  85
    Registration date Jun 7, 2011
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page