Disabling the Date Link in Blog posts

rated by 0 users
This post has 6 Replies | 3 Followers

Not Ranked
Posts 3
Points 45
Prescotti Posted: Tue, Dec 12 2006 2:44 PM

How do I disable the link on the date field in the file Skin-EntryList.ascx so that it's just text with the date. Here is the code below

asp:Repeater id="EntryItems" Runat="server">

<ItemTemplate>

<div class="post">

<div class="postsub">

<h2><asp:HyperLink id="PostTitle" runat="server" /></h2>

<div class="postsubhead">

Here is the line I need to change!! <asp:HyperLink id="PermaLink" Text="Perma Link" Runat="server" CssClass="date" />&nbsp;&nbsp;

<CS:ResourceControl ID="ResourceControl2" runat="Server" ResourceName = "Utility_ForumAnchorType_MenuSpacer" />&nbsp;&nbsp;

<asp:HyperLink id="CommentsLink" Runat="server" CssClass="comments" />&nbsp;&nbsp;

<CS:ResourceControl ID="ResourceControl1" runat="Server" ResourceName = "Utility_ForumAnchorType_MenuSpacer" />&nbsp;&nbsp;

<CS:InlineTagEditorPanel runat="server" id="InlineTagEditorPanel" InlineEditorID="InlineTagEditor" />

</div>

<asp:Literal id="Body" runat="server" />

<asp:HyperLink id="ReadMoreLink" Runat="server" />

 

Thanks in advance!

Prescotti

Top 500 Contributor
Posts 45
Points 565
AlphaWu replied on Wed, Dec 13 2006 1:26 AM
<!--<asp:HyperLink id="PermaLink" Text="Perma Link" Runat="server" />-->
  • | Post Points: 20
Not Ranked
Posts 3
Points 45
Prescotti replied on Fri, Dec 15 2006 11:40 AM

Sorry I didn't make myself clearer. I need to disable the link but keep the date.

Thanks.

  • | Post Points: 20
Top 50 Contributor
Posts 765
Points 39,815
CS Developers

You could set the Date Link to not visible and then write out the text value of it like this:

<asp:HyperLink id="CommentsLink" Runat="server" CssClass="comments" Visible="False" />

<%= CommentsLink.Text %>

Kevin Harder

  • | Post Points: 35
Top 500 Contributor
Posts 100
Points 1,755
samuel337 replied on Sun, Dec 17 2006 3:09 AM

IIRC, if you set a ASP.NET control's visible property to false, all it does is add the css attribute visibility: hidden;. The problem with this is this attribute tells the browser to hide the control, but still leave the space allocated to it free. This is as opposed to display:none; which makes the control disappear as if it never existed on the page.

Just something to watch out for when you're laying the page out - if you get weird gaps, that's why.

Sam
 

  • | Post Points: 5
Not Ranked
Posts 1
Points 20

this code no works for me.

Please, I need to disable the link but keep the date. Tongue Tied

There are any way?

  • | Post Points: 20
Top 50 Contributor
Posts 765
Points 39,815
CS Developers

Guillermo:

this code no works for me.

Please, I need to disable the link but keep the date. Tongue Tied

There are any way?

You replied to a very old thread. What version of Community Server are you using?  The information above was for CS 2.1 which had much less flexible theme system than the current version, CS 2007.

If you are using CS 2007, you can simply remove the LinkTo="..." attribute on the WeblogPostData control that is displaying the date.

For example, change this:

<CSBlog:WeblogPostData Property="UserTime" LinkTo="Post" IncludeTimeInDate="true" runat="server" />

to:  

<CSBlog:WeblogPostData Property="UserTime" IncludeTimeInDate="true" runat="server" />

Hope that helps.

Kevin Harder

  • | Post Points: 5
Page 1 of 1 (7 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems

Copyright© 2008 Telligent Systems Inc. All rights reserved
CommunityServer.com  •  Telligent.com