5 Replies Latest reply on Sep 5, 2008 12:14 PM by c_webgirl

    Edit or Add Link Parameters

    c_webgirl
      Hi all,

      I've got a few areas of my website that link to popup windows and use link parameters. Example: The gallery contains 30 images and each link sends the image name as the parameter to the popup window (uses a little javascript, too). Here's what the link looks like:

      <a href="#" onClick="window.open('popup.asp?image=feat1.jpg', '', 'height=550,width=750,scrollbars=no')" ; >
      <img src="images/feat1.jpg" /></a>

      Is there any way to edit this information from within Contribute? Yes, I know you can edit the source file, but to minimize problems, I'd rather keep my clients away from the source code, so being able to edit this information in Contribute - like in the link properties or something would be really helpful.

      I thought of using just "target=_blank", but I need to give the popup window a height and width, and those values differ. Plus, I need to pass the image name to the popup to display the correct file.

      The 'Add HTML Snippet' feature was almost what I was looking for, but it doesn't seem to be able to 'edit' existing html, it only adds new HTML.

      Is there any easier way to do this, so that Contribute users can edit these items while staying out of the source code?

      Can anyone think of an alternate method to what I'm trying to do?

      Thanks.




        • 1. Re: Edit or Add Link Parameters
          Level 7


          > Is there any easier way to do this, so that Contribute users can edit these
          > items while staying out of the source code?

          Are they just needing to edit the existing ones that you insert with
          dreamweaver?

          A way would be to put them in a locked region of a templated page, and
          assign "editable attributes to all the values they would need to change.
          Then the contribute user could use "Template Properties" to edit the src,
          height, and width by hand. They would have to know the image size somehow-
          it wouldn't be calculated for them.

          If you try this- come up with a naming convention for the editable
          attributes so they can know what one they are editing by seeing it's name in
          the Template Properties dialog box
          One_src, One_width, One_height, Two_src or something like that.

          --
          Alan
          Adobe Community Expert, dreamweaver

          http://www.adobe.com/communities/experts/



          • 2. Re: Edit or Add Link Parameters
            c_webgirl Level 1
            Alan,

            Thanks for the reply. In one section, I only want them to be able to edit existing pictures. They should be able to change the picture, and the page the picture links to. There is no parameter there, but there is the javascript code with the window height, width, scrollbars, etc. If I try to setup the template option with the editable region here, would they be able to change the javascript code? or only attributes of the 'img' and 'a' tags?
            However, in the other section, I want them to be able to add new pictures, delete old ones, change the order they are displayed, add a parameter to the link (the parameter is the most important part of this), and also edit the javascript code with the window height, width, scrollbars, etc. Am I asking too much of Contribute here?

            Thanks,
            • 3. Re: Edit or Add Link Parameters
              c_webgirl Level 1
              Alan,

              By the way - in contribute I selected to edit the source code. The page opened in Dreamweaver. I selected the <a> tag, went to 'Modify' > Templates > 'Make attribute editable' and listed the 'onclick' event as the paramater. I got the notice that the file was going to be saved as a template. I clicked OK. I saved the file and returned to Contribute.
              The option 'Template Properties' was not available.
              Am I supposed to connect to the site with Dreamweaver, make the attribute editable, save it as a template, and upload it to the server, then connect with Contribute to see 'Template Properties' become available?
              This may work well for me. Please let me know the proper procedure.

              Thanks.
              • 4. Re: Edit or Add Link Parameters
                Level 7


                > Am I asking
                > too much of Contribute here?

                yes, there's no user friendly way to let a contribute user do those things
                on a third-party javascript thing.
                --
                Alan
                Adobe Community Expert, dreamweaver

                http://www.adobe.com/communities/experts/



                • 5. Re: Edit or Add Link Parameters
                  c_webgirl Level 1
                  Alan,

                  Thank you again for your time. I figured as much with the gallery where there are 30+ items all with there own 'onClick' events. Fortunately, I have created something custom for that, so that the users will be able to add, move, delete, etc.

                  Another usability question, if you don't mind: What are your thoughts on keeping the file structure organized? New template based pages default to the root folder, and it seems as though you have to rely on the user to make certain the files are saved appropriately. In my opinion - users don't remember what you tell them.

                  Thanks