SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Adding link in xml file

    Hello everyone,

    I'm a photographer and my web designer is temporary unreachable at the moment and I need to urgently add hyperlink to my site.

    My site is html and currently I can add new things by editing an existing xml such as the following:

    <portfolio>
    <items>
    <item>
    <thumbnail>portfolio/blackwhite/01.jpg</thumbnail>
    <preview>portfolio/blackwhite/13_big.jpg</preview>
    <description> Sample description </description>
    <category>bw</category>
    </item>
    </items>
    </portfolio>

    Now I would like to add a hyperlink to it, maybe on Sample description can be changed to Click to Visit with a link to it.

    I think the xml file is connected to a .js file so if it's relevant you can review the code here http://pastebin.com/raw.php?i=D5QrDJv4

    Hope you guys can help me out, need to sort this out urgently

    Thanks!!

  2. #2
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Does replacing <description> Sample description </description> with this do the job?

    Code XML:
    <description> <a href="link path or URL goes here">Click to Visit</a> </description>

  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I forgot to mention, when the image is clicked it will display a bigger preview in lightbox.

    The description displays in the enlarged light box however the <description> <a href="link path or URL goes here">Click to Visit</a> </description> does not work, I can see "Click to Visit" but it's not clickable

  4. #4
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Can you provide a link to the site?

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Victor,

    Sorry I'm unable to provide the link to my site because it contains private albums of my client.

    I'm thinking maybe I need to add something in the javascript for a new tag like <hyperlink> </hyperlink> and define it's function as a url

    So in the xml file I can put <hyperlink> http://google.com </hyperlink> and it'll recognize it as a link

  6. #6
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,227
    Mentioned
    265 Post(s)
    Tagged
    5 Thread(s)
    There is an "XML and Web Services" section on the forums. You'd probably be better off asking there. (Click the orange flag and ask a moderator to move the thread.)

  7. #7
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,500
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I think the OP is right and it's more a javascript question. Adding the new tag to the XML file is easy, the hard part is having the js use that new tag.

    Moved the thread to the JS forum

  8. #8
    SitePoint Wizard bronze trophy Immerse's Avatar
    Join Date
    Mar 2006
    Location
    Netherlands
    Posts
    1,661
    Mentioned
    7 Post(s)
    Tagged
    1 Thread(s)
    Who built this site? Can't you contact them to ask them to add the link?

    We'll need to see the HTML too to form an answer yo your question.

  9. #9
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been calling my designer for few days now and he's temporary unavailable.

    On a side note

    How do I add a link to the following image so it opens a new window when it's clicked

    <img src="portfolio/art/1.jpg" width="125" height="125" border="0" alt="" />


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •