Take the 2-minute tour ×
Tridion Stack Exchange is a question and answer site for Tridion developers and administrators. It's 100% free, no registration required.

I just noticed the title of the question has been updated. I'm not sure you understand what i'm looking for. Maybe i was not clear enough.

In a DWT i have the following block of code:

 <div class="contactBloc">

                      <legend class="hidden">@@Component.Fields.theme_title@@</legend>

                       <h2>@@Component.Fields.theme_title@@</h2>
                       <div class="fieldset">
                                       <ul id="selectTheme">
                                                       <!-- TemplateBeginRepeat name="Component.Fields.theme" -->
                                                       <li><a tridion:href="@@Field.theme_form@@" rel="">@@Field.theme_name@@</a></li>
                                                       <!-- TemplateEndRepeat -->                                                    
                                       </ul>
                                       <span class="clear">&nbsp;</span>
                       </div>
        </div>

in the "a" tag above, the href attribute contains for instance "/contact/contact.aspx"

This is how it works right now!

Now, i don't use any "a" tags anymore, i have to use a "input" tag instead. Therefore, i want to display "/contact/contact.aspx" in the "rel" attribute of the "input" tag.

Instead of

<a tridion:href="@@Field.theme_form@@" rel="">@@Field.theme_name@@</a>

i tried, as you wrote:

<input type=""checkbox" tridion:href="@@Field.theme_form@@" tridion:targetattribute="rel">@@Field.theme_name@@</a>

But in the code generated, i have no rel and what href contains instead of "/contact/contact.aspx" is just "tcm:XX-XXXX"

Thanks for your help

share|improve this question
    
Hi Arnaud. You're probably for tridion:linkAttributes. See this question from some info: stackoverflow.com/questions/12046332/… and tridion.stackexchange.com/questions/2346/… –  Frank van Puffelen Jul 29 at 15:16
    
Thanks a lot for your fast reply. Unfortunately this is the code generated: <input id="Investor Relations" type="checkbox" tridion:linkattributes="tcm:127-28220"> –  Arnaud Ad Jul 29 at 15:22
    
it's tridion:targetattribute, see answer below. –  Nuno Linhares Jul 29 at 15:23
    
Your input element looks malformed - is that what's in your template verbatim? type=""checkbox" - also, not sure if this is necessary but in Nuno's example he includes a dummy rel attribute. –  Ant P Jul 30 at 10:45

2 Answers 2

Welcome to Stack Exchange Arnaud.

This page on SDL Live Content (login required) shows the various options you have for linking.

You can achieve the functionality you want with something like this:

<input id="blahblah" rel="something" tridion:href="@@Field.theme.form@@" tridion:targetattribute="rel" />
share|improve this answer
    
Thanks for your help: I tried this : <input tridion:targetattribute="@@Field.theme_form@@"></input> But the code generate is : tridion:targetattribute="tcm:XX-XXXX" :( –  Arnaud Ad Jul 29 at 15:29
    
Nuno says to set <input tridion:targetattribute="rel" tridion:href="@@Field.theme.form@@". Copy/paste carefully please. –  Frank van Puffelen Jul 29 at 15:51
    
You need to use both tridion:href and tridion:targetattribute="name_of_attribute_to_get_result" –  Nuno Linhares Jul 29 at 16:18
    
I just tried what you wrote but it still does not work. no "rel" attribute appears in my input and the href contains "tcm:XX-XXXX". On the other hand when i write this tridion:href in a "a" tag it works ... –  Arnaud Ad Jul 30 at 7:48

I just noticed the title of the question has been updated. I'm not sure you understand what i'm looking for. Maybe i was not clear enough.

In a DWT i have the following block of code:

 <div class="contactBloc">

                      <legend class="hidden">@@Component.Fields.theme_title@@</legend>

                       <h2>@@Component.Fields.theme_title@@</h2>
                       <div class="fieldset">
                                       <ul id="selectTheme">
                                                       <!-- TemplateBeginRepeat name="Component.Fields.theme" -->
                                                       <li><a tridion:href="@@Field.theme_form@@" rel="">@@Field.theme_name@@</a></li>
                                                       <!-- TemplateEndRepeat -->                                                    
                                       </ul>
                                       <span class="clear">&nbsp;</span>
                       </div>
        </div>

in the "a" tag above, the href attribute contains for instance "/contact/contact.aspx"

This is how it works right now!

Now, i don't use any "a" tags anymore, i have to use a "input" tag instead. Therefore, i want to display "/contact/contact.aspx" in the "rel" attribute of the "input" tag.

Instead of

<a tridion:href="@@Field.theme_form@@" rel="">@@Field.theme_name@@</a>

i tried, as you wrote:

<input type=""checkbox" tridion:href="@@Field.theme_form@@" tridion:targetattribute="rel">@@Field.theme_name@@</a>

But in the code generated, i have no rel and what href contains instead of "/contact/contact.aspx" is just "tcm:XX-XXXX"

Thanks for your help

share|improve this answer
    
Is this an answer to the question? –  Ant P Jul 30 at 8:53
    
no, this is just an amelioration of my question. The lenght was too important to reply only in the standard place ... sorry –  Arnaud Ad Jul 30 at 9:09
    
@ArnaudAd please edit your question and add this information in there, and then you can delete this, since it is not an answer. You as the one having asked the question should never use the comments on your own question, since you can edit the question to add the additional information or react on the comments that are given. –  Bart Koopman Jul 30 at 9:40
    
Done. Thanks for the advice –  Arnaud Ad Jul 30 at 9:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.