9 Replies Latest reply: Nov 3, 2013 1:18 PM by Strom37 RSS

    Renaming Tag Attribute

    Strom37

      Cannot rename an "a" tag attribute in a DWT. I go to Modify, Templates, Make Attribute Editable. In the pop up I click add, another pop_up box asks me to name the new attribute. However it will not let me type anyting in the naming box.

       

      Any assitance is appreciated.

       

      Thanks

        • 1. Re: Renaming Tag Attribute
          Nancy O. MVP

          2 step procedure. 

           

          First, define the editable attribute in the main template.dwt file.  In this example, I'm making the class attribute editable on my <body> tag.

          DWT-EditableTagAttribute.jpg

          Next, open a child page based on your Template.  Go to Modify > Template Properties.

          DWT-Editable-attributes2.jpg

           

          Is that what you're doing?

           

           

          Nancy O.

          • 2. Re: Renaming Tag Attribute
            Strom37 Community Member

            Close. Here what we are supposed to do from the lesson from class. Taking intermediate Dreamweaver CS6.

             

            What we need to do now is go through the links one at a time, selecting the anchor tags and then modifying the template so that the class attribute is editable for each anchor tag. Is your head spinning yet? Don't panic—this is easy.

            Let's do it:

            1. In your template's Document window, select the word Home on the navbar.
            2. On the Tag Selector at the bottom of the Document window, click the <a> tag to select it.
            3. Select Modify > Templates > Make Attribute Editable from the menu bar. This opens the Editable Tag Attributes dialog box, shown here:

            Editable Tag Attributes dialog box
            Editable Tag Attributes dialog box
            There's only one problem—the attribute listed in the Attribute field isn't the one we want. The dialog box defaults to whatever attribute the tag currently has, and the only attribute in place right now is the href one. We want the class attribute, so we need to add it to the menu. We do that by clicking the Add button.

            1. Click the Add button to the right of the Attribute field to bring up another small dialog box.
            2. Type class into the field provided, as shown here:

            Adding the class attribute
            Adding the class attribute

            1. Now click OK to return to the original dialog box and finish our modifications.
            2. In the Label field, enter Home_link.
            3. Leave the Type field set to Text.
            4. Leave the Default field empty, and click OK.

             

             

            Above are the instructions for the lesson. I tried what you suggested but I stil cannot type in the pop up box

            • 3. Re: Renaming Tag Attribute
              Nancy O. MVP

              I don't really need a lesson on all this .  It's works fine for me.

              Can you tell us which version & build # of DW you're using?

              Also, elaborate a bit on what isn't working for you and in which screen shots?

               

               

              Nancy O.

              • 4. Re: Renaming Tag Attribute
                Strom37 Community Member

                Silly.

                 

                Using Dreamweaver CS6 Version 12.0 Build 5861 for Mac, MAC OS Mountain Lion 10.8.5

                 

                When I get to the last screen shot , click add and the pop up shows, I try to type the word class in the box the cursor just blinks. I can't type anything.

                 

                Thanks

                 

                Strom37

                • 5. Re: Renaming Tag Attribute
                  Nancy O. MVP

                  Does your Template.dwt contain any class attributes in the code like this?

                   

                  <ul>

                  <li><a class="home" href="home.html"></a></li>

                  <li><a class="about" href="about.html"></a></li>

                  <li><a class="contact" href="contact.html"></a></li>

                  </ul>

                   

                   

                  Nancy O.

                  • 6. Re: Renaming Tag Attribute
                    Nancy O. MVP

                    After you make the class attribute editable -- in this example "home," your code should look like this:

                     

                    <li><a href="home.html" class="@@(home)@@"></a></li>

                     

                    I've tested it both ways -- with and without classes in the code.  It works for me on Win with CS6 12.2 build 6006. 

                     

                     

                     

                    Nancy O.

                    • 7. Re: Renaming Tag Attribute
                      Strom37 Community Member

                      This is the code I have so far:

                       

                      <li><a href="#">Home</a></li>

                          <li><a href="#">Discovery of Hypertext</a></li>

                          <li><a href="#">Creation of the Web</a></li>

                          <li><a href="#">Mosaic</a></li>

                          <li><a href="#">Netscape</a></li>

                          <li><a href="#">W3C</a></li>

                       

                      The way I am reading the lesson is I am supposed to be adding a class attribute. Still fairly new to all this. Truely do appreciate your time to assist me.

                      • 8. Re: Renaming Tag Attribute
                        Nancy O. MVP

                        I can't reproduce your problem at my end.  When things don't work the way they should, it's sometimes a bad Cache or Personal Configuration file.

                        See Deleting Corrupted Cache in DW

                        http://forums.adobe.com/thread/494811

                         

                         

                        Nancy O.

                        • 9. Re: Renaming Tag Attribute
                          Strom37 Community Member

                          No luck. I am thinking unistalling and reinstallng might be my best bet.