Announcement

Collapse
No announcement yet.

Creating URL Variables

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

    Creating URL Variables

    I am in the learning process and find this site great to get quick answers. I have a section of links that I created in my design in dreamweaver. I have now created the pages in actinic, and want to add the links to the layout code. I am unsure how to create the link.

    I understand how the variables work inserting them, but how can I do the following.

    I have a page called stockists.html

    I want to create a variable so that I can just insert StockistPageURL and then on all the pages it will link to the url, but I am unsure how to do this, help most appreciated for a novice actinic user.

    #2
    Create a normal <a href="YOURVARIABLE">Link Text</a>

    Comment


      #3
      I understand doing that within actnic, but how do you get the url? If I create a new variable in the library section where do you put the link page?

      I am working on a site given from a client and totally new to actinic, I just need to understand how they work.

      I can just enter the url manually in the design layout but that defeats the object as when you have files in folders the links will fail.

      Comment


        #4
        When you create the variable, you can assign a value to it there and then, i.e. if it is not needed to change... so assign it when you create it... you can also enable it for change at site, section and so on levels if you want...

        Maybe need to read up on the very basics of variables in the Actinic Help to get you started.

        Comment


          #5
          Thanks for the help, I did have alook at variables. Okay then this is what I have done. I created a new variable with the following settings.

          Basic Definition

          Name: StocklistsURL
          Description: URL of the Stocklists Page
          Prompt: StocklistsURL

          Group: Site

          Place of setting: Site

          At the bottom where it says initial value I entered: stockists.html

          Now when I add the variable to the layout it does show as stockists.html, but I would have thought actinic would be clever and change it for the preview to P_stockists.html as it does with the preview pages of the site. But it does not do this it just shows as stockists.html which is not good to test the links etc.. I know it will be something easy...

          I need to do this for a few links.

          Comment


            #6
            Actinic can not know if the variable connects to something local or not, so can not do it for you, but use

            IsPreviewMode - or something like that as a block infront of your own variable, and inside the block add _P to cover preview mode needs.

            Comment


              #7
              Thanks again. So then can you explain further on this for me. What happens then if you create links within your design to certain pages and you can click the links if the files are within the main directory, how do the links work when you switch to a folder for example, as the paths will change.

              ie: a href="stock.html"

              But if you are in the catalogue it would need to be ../stock.html
              ??

              Comment


                #8
                If the file you are linking to is not within the acatalog folder online, and is not within the previewhtml folder when building locally, then create block-ifs to cater for this.

                i.e. a blockif for <actinic:variable name="IsPreviewMode" /> so local... and enter the path which would work locally and ... <actinic:variable name="IsNotPreviewMode" /> for what the path from the page within Actinic would need to be...

                Comment

                Working...
                X