We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 30816
    • 26 Posts
    I have a following problem.
    On my website I will add some documents which will have some priority for example:
    documents with priority 1 will be always on the top [on the main page of course]
    the rest documents with priority 2 will be below.

    Documents with priority 1 should be diplay in another way then documents with prority 2 [the will have darker background].

    And the last thing is ...I would like to set expiry date of my 1 priority documents ....when the date will expire they should normal documents with 2 priority.

    Anyone could help me how should I do it?
    I don’t have any ideas how to mark my documents with priorities and how to make ditto call.

    I will be very glad for your help.
      • 4172
      • 5,888 Posts
      you need two TVs, one for priority and the other one for expire-date.

      then you can use the ditto-parameter &orderBy to order the documents to priority and so on.
      Or use two ditto-calls one filters the docs with priority 1, the other one filters the docs with priority 2.

      to set the priority to a new value after the expire-date you have to create a plugin that makes the job (use the onParseDocument - Event)

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 30816
        • 26 Posts
        Quote from: Bruno17 at Aug 25, 2008, 04:28 AM

        you need two TVs, one for priority and the other one for expire-date.

        then you can use the ditto-parameter &orderBy to order the documents to priority and so on.
        Or use two ditto-calls one filters the docs with priority 1, the other one filters the docs with priority 2.

        to set the priority to a new value after the expire-date you have to create a plugin that makes the job (use the onParseDocument - Event)



        I know that I will need TVs for priority and expriy that but I don’t know how to connect ditto with this TV.
        For example:

        I have a TV called "priority"
        First article has TV "priority" set "1"
        Second and Third have "priority’ set "2"

        when I use Ditto I can display then but they will be display the same...I would like that this document with "priority"=1 will have dark background.
        How to do it?
          • 4172
          • 5,888 Posts
          in your ditto-tpl you can use the placeholder like this: class="priority[+priority+]". Then you have the classes priority1 and priority2, which you can style in your CSS.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 30816
            • 26 Posts
            thanks, it works perfectly smiley