Announcement

Collapse
No announcement yet.

Date Prompt Help Please.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Date Prompt Help Please.

    Within the date prompt i need a way to display the years in descending order. Is this possible?

    Cheers in advance

    Ben
    Ben Adcock
    Caged Fish Web Design

    #2
    What date prompt are you referring to Ben?

    Comment


      #3
      I am referring to the Date Info Question and Date Range within the prompts tab on a product.

      It is the layout named YearList that i need to get in descending order.

      Ben
      Ben Adcock
      Caged Fish Web Design

      Comment


        #4
        hi Ben,

        Am checking this one for you.

        Regards,
        Bruce King
        SellerDeck

        Comment


          #5
          Ben,

          That is one for the wish list. The variable 'YearList' is not editable at the moment. I will add it in there for you.

          Kind regards,
          Bruce King
          SellerDeck

          Comment


            #6
            You can fudge it. Edit layout Standard Year List and replace the line
            Code:
            <Actinic:Variable Name="YearLayout"/>
            with
            Code:
            <actinic:block php="true">
            $startyear = 2007;
            $endyear = 2020;
            $optionyear = '<Actinic:Variable Name="YearLayout" encoding="perl" selectable="false" />';
            $optionyear = $startyear + ($endyear - $optionyear);
            echo $optionyear;
            </actinic:block>
            And change the values for
            $startyear = 2007;
            $endyear = 2020;
            to match what you actually use.
            Note this this displays weirdly on Design Preview but is OK on Content Previews and live pages.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              Excellent Norman !! What can I say
              Bruce King
              SellerDeck

              Comment


                #8
                Here's a more complex to install, but completely automatic, reverser for the year list.

                Edit layout Standard Year List. Replace the line
                Code:
                <Actinic:Variable Name="YearLayout"/>
                with
                Code:
                <actinic:block php="true">
                echo " ";
                $dates[] = '<Actinic:Variable Name="YearLayout" encoding="perl" selectable="false" />';
                </actinic:block>
                Click the "Click here to edit list layout settings", select the Edit Rows and Columns tab.
                Delete the text in Middle Rows / First Item / Before
                Delete the text in Middle Rows / First Item / After
                Set No of Items / Last Row to be 1
                In Last Row / Before Row add the code
                Code:
                <actinic:block php="true">
                $dates = array_reverse($dates);
                foreach($dates as $thisdate)
                	{
                	echo "<option>$thisdate</option>";
                	}
                $dates = array();
                </actinic:block>
                Now the years appear reversed.
                Norman - www.drillpine.biz
                Edinburgh, U K / Bitez, Turkey

                Comment


                  #9
                  And here's a Partial Site Design Snapshot that installs the above.
                  Attached Files
                  Norman - www.drillpine.biz
                  Edinburgh, U K / Bitez, Turkey

                  Comment


                    #10
                    Thanks a lot Norman. Note to all, who may also benefit from this. You still have to :

                    Edit layout Standard Year List
                    Delete the text in Middle Rows / First Item / Before
                    Delete the text in Middle Rows / First Item / After
                    Otherwise you get blank values at the top of the drop down. Thanks again Norman for your help, and to you too bruce. And the wonder that is partial design snapshots!

                    Ben
                    Ben Adcock
                    Caged Fish Web Design

                    Comment


                      #11
                      Ben,

                      Are you saying that after importing my partial design snapshot, you had to delete the two lines mentioned in #10?

                      That's weird as my design should leave these fields empty. I would have thought that importing a layout would alter the whole thing, not merge the new with the old.
                      Norman - www.drillpine.biz
                      Edinburgh, U K / Bitez, Turkey

                      Comment


                        #12
                        Norman,

                        Yes i did have to delete the two lines mentioned in #10. It did seem to merge the two together. Could that be because i'm still using 8.03 to your 8.04?

                        Ben
                        Ben Adcock
                        Caged Fish Web Design

                        Comment


                          #13
                          I doubt it. I'm not sure if this is a bug or designed behaviour. Anyone from Actinic know?
                          Norman - www.drillpine.biz
                          Edinburgh, U K / Bitez, Turkey

                          Comment


                            #14
                            My guess is that it's a bug - as I get this behaviour too.

                            Could you confirm that the before/after fields on the middle row of your layout are definitely not used?

                            Comment


                              #15
                              Hi, Chris

                              I looked at the Act_DesignExport.txt within post #9's Partial Design Snapshot and these fields are definitely empty.
                              Norman - www.drillpine.biz
                              Edinburgh, U K / Bitez, Turkey

                              Comment

                              Working...
                              X