1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Questions about {xen:link}

Discussion in 'XenForo Development Discussions' started by Astrum, Mar 23, 2011.

  1. Astrum

    Astrum Active Member

    Hi guys,

    I had a few questions about using {xen:link}. Specifically it has three parameters, type, data, and extraParams. I have a question about each one.

    For the type, is this solely for a prefix and action? That is, you can only build a link to something within your XF install, or can you pass it a full, external URL such as http://www.google.com/? I assume yes, but I haven't actually tested it yet. Also, when should you and when shouldn't you prepend it with "full:"?

    For data, what is this for? I'm still learning XF but I haven't seen anything use this parameter while looking over stuff.

    And the last one, extraParams, I'm a bit confused about. The other two parameters can be set to a variable in a template but the third cannot, such as href="{xen:link $foo, $bar, $baz}". The template compiler will throw an error on this. The only way I could do it would be for the third parameters to be something like 'type={$baz}' but that wouldn't really make sense. I realize that the extraParams are an array, but I'm not sure how to make this work even if the variable is an array.

    Thanks
     

Share This Page