Announcement

Collapse
No announcement yet.

Using Variables in templates

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

    Using Variables in templates

    I guess this is a general question for future reference and my education based on a specific template mod I have tried.

    Making the LOGOIMAGE into a link to the homepage.

    I've searched the forums (not just the V7 forum) and have found various articles on how to achieve this.

    http://community.actinic.com/showthr...oimage+as+link

    http://community.actinic.com/showthr...oimage+as+link


    The way I thought I would go about it was to edit the Act_LogoImage.html.

    <!-- LogoImage HTML begin -->
    <!-- This file is used to build the logo image markup. -->
    <A HREF="index.html">
    <IMG SRC="NETQUOTEVAR:IMAGEFILE"
    ALT="NETQUOTEVAR:ALTERNATETEXT"
    BORDER=0
    NETQUOTEVAR:IMAGEHEIGHT
    NETQUOTEVAR:IMAGEWIDTH
    NETQUOTEVAR:OTHERIMAGEMARKUP>
    <!-- This file is used to build the logo image markup. -->
    <!-- LogoImage HTML end -->


    I've found that when I specify "index.html" or whatever page I wish to use the link works on a live site but won't work in Offline Preview because the homepage name is prefixed with P_.

    So trying to be clever I thought I would use a variable so that Actinic could manage the path dynamically so that it works for Preview and Live sites.

    I checked www.w3schools.com http://www.w3schools.com/HTML/tryit....ryhtml_imglink

    I searched the Adv Usr Guide and found the BASEHREF variable which is described as being the "base url of the actinic store" taken from the Network Settings.

    I also looked at the Act_NavigationItem.html that was talked about in one of the above threads and saw how the variable is inserted into code but when I use the example below it doesn't work.

    <!-- LogoImage HTML begin -->
    <!-- This file is used to build the logo image markup. -->
    <A HREF="NETQUOTEVAR:BASEHREF">
    <IMG SRC="NETQUOTEVAR:IMAGEFILE"
    ALT="NETQUOTEVAR:ALTERNATETEXT"
    BORDER=0
    NETQUOTEVAR:IMAGEHEIGHT
    NETQUOTEVAR:IMAGEWIDTH
    NETQUOTEVAR:OTHERIMAGEMARKUP>
    <!-- This file is used to build the logo image markup. -->
    <!-- LogoImage HTML end -->


    When you hover over the logo the status bar of the browser shows the code i.e. netquotevar:basehref not the value assigned to that variable.

    Why? What am I missing?

    #2
    NETQUOTEVAR:BASEHREF is the used for the base reference tag, try NETQUOTEVAR:NAVBHOMELINK instead.
    Last edited by peblaco; 22-Jan-2010, 11:26 AM. Reason: amendment
    Peblaco

    Comment


      #3
      <!-- LogoImage HTML begin -->
      <!-- This file is used to build the logo image markup. -->
      <A HREF="NETQUOTEVAR:NAVBHOMELINK">
      <IMG SRC="NETQUOTEVAR:IMAGEFILE"
      ALT="NETQUOTEVAR:ALTERNATETEXT"
      BORDER=0
      NETQUOTEVAR:IMAGEHEIGHT
      NETQUOTEVAR:IMAGEWIDTH
      NETQUOTEVAR:OTHERIMAGEMARKUP></A>
      <!-- This file is used to build the logo image markup. -->
      <!-- LogoImage HTML end -->

      Thank you Peblaco for the suggestion. I have tried the other variable but the end result is the same in the status bar.

      After opening the file I did also spot that I omitted </A> I take it I've put it in the correct position. It is as far as the example on w3schools shows.

      Comment


        #4
        NAVBHOMELINK doesn't exist in V7.0.7 according to the Adv Usr Guide but NAVBHOME does but again that doesn't work.

        I'll try one of the other examples and edit the Act_Primary.html instead. If not I'll guess I'll settle for using http://<mysite.com>/index.html

        Thanks for your help

        Comment

        Working...
        X