Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • johnleox 4 posts 20 karma points
    Mar 30, 2009 @ 13:08
    johnleox
    0

    unable to get url from content picker


    Hi All,

    I am new to umbraco. I have a content picker in my document type.

    I have created a template and trying to use the following.



    when I output sURL i am getting the url details but i am unable to use it in

    anchor tag. It does not give any error...

    Can any body help me on this i am not using any other marco to get the URL.

    Help in this regard would of a great help.

    Regards,
    Leo

  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 13:46
    David Conlisk
    0

    If I understand you correctly, you can try this in your xslt:

    [code]






    [/code]

    This should give you a link to your url.

    David

  • johnleox 4 posts 20 karma points
    Mar 30, 2009 @ 13:53
    johnleox
    0

    Hi David,

    Thanks for your code.

    But i am not getting the full URL.

    I would like to explain bit more about my problem.

    I have a content picker in my document type. After select the item from content picker i am unable to display it in website.

    I am getting the top level site "http://yourwork.demo1.com/"

    I need to get "http://yourwork.demo1.com/page1.aspx" or "http://yourwork.demo1.com/page4.aspx"

    are you getting my problem? User can pick any page in the website to set as a link.

    I am with this problem since 3 days can you help me please....

    regards,
    Leo

  • David Conlisk 432 posts 1008 karma points
    Mar 30, 2009 @ 15:32
    David Conlisk
    0

    Can you post your existing code so that I have a better idea of what you are trying to achieve?

  • johnleox 4 posts 20 karma points
    Mar 31, 2009 @ 09:22
    johnleox
    0

    Hi David,

    This is full code. I am trying display news items. New Items have external (textstring document type) and internal links (content picker).

    external url works. But when i try to choose internal links it does not work.

    waiting for your help on the same.


    [code]

    <>
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">































    [/code]

  • Douglas Robar 3570 posts 4711 karma points MVP ∞ admin c-trib
    Mar 31, 2009 @ 13:53
    Douglas Robar
    0

    It would be good to double-check the value of the content picker.

    Can you add this code (temporarily) to see what output you get and let us know?

    [code]

    [/code]

    For the copy-of output, you'll want to look at the html source in your browser since the browser won't know how to display the raw xml properly.

    cheers,
    doug.

  • johnleox 4 posts 20 karma points
    Mar 31, 2009 @ 18:16
    johnleox
    0


    Hi David and Doug.

    Thanks for your help on the same.

    I figured out the problem. I was successfully debugged and completed the task.

    Hope this helps for everyone else who is having similar problem.

    Solution:

    Step 1. Create a Parameter in the marco.

    [code]
    linkinternal of type number.
    [/code]

    Step 2. XSLT Code for Get the Items with some minor Change.


    [code]

    <>
    version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxml="urn:schemas-microsoft-com:xslt"
    xmlns:umbraco.library="urn:umbraco.library"
    exclude-result-prefixes="msxml umbraco.library">































    [/code]

    Step 3: Call Macro from the Template

    [code]
    MACRO macroAlias="Newslist" linkinternal="linkurlct_picker">
    [/code]

Please Sign in or register to post replies

Write your reply to:

Draft