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

I have a contact email address in my page layout. I want to make that link clickable, but doesn't work in the href tag. What is the best way to get this to work in the page layout? Do I need to use jquery for this, we are trying to avoid that but if its my only option I guess Ill need to go that route.

share|improve this question
add comment

1 Answer 1

if I'm not wrong you can try to use SPContext.Current.Item in the page layout like this

<a href='<%= SPContext.Current.Item["filedName"] ?? "/" %>'>Link</a>
share|improve this answer
    
I cant use code blocks in the page layout, thanks for the suggestion though –  Cory Feb 25 '13 at 19:36
    
Can you store your data as a string with tag "a" in you field and use this line of code <SharePoint:FieldValue id="someid" FieldName="FieldName" runat="server"/>? –  Alexander Feb 25 '13 at 19:49
    
nope tried that too, its looking like Ill need to use jquery –  Cory Feb 25 '13 at 20:02
    
have you tried to use Hyperlink field type to store data? and FieldValue control? –  Alexander Feb 25 '13 at 20:09
    
I found this post. In this post the link is built for Lookup field. I think that it should work for your field too. –  Alexander Feb 25 '13 at 20:11
show 1 more comment

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.