Announcement

Collapse
No announcement yet.

What is the fisrt page to be Processed when uploading.

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

    What is the fisrt page to be Processed when uploading.

    Hi

    Does anyone know in what order Actinic processes(PHP) pages before uploading?

    I have written a PHP code to calculate the shops content tree and products, it stores them in arrays (similar to Javascript, but more useable). But it only needs to be run once, not on every page as it is at the moment.

    I could use if (isset($arr)==true){ run once; $arr=1;} to determine if arrays have been created, but that still doesn't stop Actinic pasting the code to every page, before Actinic runs the PHP.

    So Ideally, I just need to add this code to the first page proccessed(PHP).

    Any ideas.

    cheers
    Sean

    #2
    Not quite what you're after but you can make a condition in your PHP like

    if ('<actinic:variable name="PageType" />' == 'Search' )

    which will only be true when the Search page is being generated.

    Or create a similar condition controlling an Actinic block and place your PHP within it.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    Comment


      #3
      Try (assuming you use Brochure)

      Code:
      <actinic:block if="%3cactinic%3avariable%20name%3d%22IsBrochureHomePage%22%20%2f%3e" >
      *** PHP BLOCK HERE ***
      </actinic:block>
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Thanks Norman

        That's it. I just needed to know what page is the first to be generated

        The following seems to work correctly. When looking at a site being uploaded, I noticed the Shop's site root section is the first - hope that stays that way now

        I had to use two If blocks, first one looks for Section pages, and the second for SectionID=0. If first block left out, your get an error SectionID used out of context as it is not avaliable for Brochure pages.

        <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%3d%3d%27Section%27" >
        <actinic:block if="%3cactinic%3avariable%20name%3d%22SectionID%22%20%2f%3e%3d%3d%270%27" >
        ### PHP Block ###
        </actinic:block>
        </actinic:block>

        Thanks
        Sean

        PS How do you turn off previewmode? Window/Page Preview toggle, but it doesn't seem to turnoff background preview/update, only the preview window. I seem to remember it being hidden away somewhere(variable?).

        Comment


          #5
          Just to close the preview window pane - I don't think you can actually turn it off as in previous versions.

          Comment


            #6
            For a brakedown of what happens when on upload check here. http://knowledge.actinic.com/acatalo...Facts_376.html

            Comment


              #7
              Cheers Daniel

              It appears the Forums Upload info needs updating or correcting.
              Because when Uploading, the first thing to happen is Checking HTML Pages then Checking Catalog. They state the otherway round.

              Sean

              Comment

              Working...
              X