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.
1 Answer
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>
-
I cant use code blocks in the page layout, thanks for the suggestion though– CoryFeb 25, 2013 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"/>
? Feb 25, 2013 at 19:49 -
-
have you tried to use Hyperlink field type to store data? and FieldValue control? Feb 25, 2013 at 20:09
-