Diferent Class for Title and Edid button in Blog module

This is a forum to suggest new features for mojoPortal. 

This thread is closed to new posts. You must sign in to post in the forums.
2/28/2011 4:09:56 AM
Gravatar
Total Posts 108
Community Expert

Diferent Class for Title and Edid button in Blog module

Hi Joe I'm using a blog module and need to make invisible the titles of the articles in the blog the trouble is that if I use the blogtittle class I lost the edit button. 

Please can you add a different class for the <a> title element 

2/28/2011 9:44:37 AM
Gravatar
Total Posts 18439

Re: Diferent Class for Title and Edid button in Blog module

Hi German,

That won't work because the heading contains the link and if you hide the heading it will hide the link no matter what you do to style the link because it is contained inside the heading.

It is already possible to select the link with css like

h2.blogtitle a.ModuleEditLink {} on the detail page or

h3.blogtitle a.ModuleEditLink {} on th epost list but no matter how you style it if you set display:none; on the h2 or h3 it will hide the link as well.

Best,

Joe

 

2/28/2011 10:05:38 AM
Gravatar
Total Posts 108
Community Expert

Re: Diferent Class for Title and Edid button in Blog module

Hi Joe maybe I don't explain my self very well, I review the code and see that the edit link as you say have a ModuleEditLink class, and try to using that but as you pointed the blogtitle class override any change in the moduleeditlink class.  What I was asking for is implement a similar class for the <a> element that contain the title text.

If this was made I can access the title using something like

h2.blogtitle a.blogItemTitle {display:none;}

To be more specific in the BlogViewControl.ascx you have a <asp:literal id="litTitle" runat="server" enableviewstate="false" /> I was asking for include a cssclass (blogItemTitle) so I can access the title via css coding 

 

Thanks, for the quick answer as always

2/28/2011 10:39:20 AM
Gravatar
Total Posts 2239

Re: Diferent Class for Title and Edid button in Blog module

Hi,

You can do this with the CSS visibility property. We have done this many times in various projects. Here's a CSS snippet that would get you started. It is for the Module Title but the principles remain the same for the Blog Title.

.bannercontainer h2.moduletitle {
    color: #626262;
    left: 4px;
    position: absolute;
    top: -23px;
    visibility: hidden;
}
 
.bannercontainer h2.moduletitle a.ModuleEditLink, .bannercontainer h2.moduletitle a.ModuleEditLink:link, .bannercontainer h2.moduletitle a.ModuleEditLink:active, .bannercontainer h2.moduletitle a.ModuleEditLink:visited {
    float: left;
    left: 0;
    padding: 10px 10px 0 0;
    position: relative;
    top: 0;
    visibility: visible;
}
 
So, all this is doing is setting the h2.moduletitle element to be hidden but all links inside of the h2.moduletitle element to be visible. The floating is necessary on the links to make sure the links do not sit on top of each other.
 
Joe, one thing that would make this a bit easier would either be moving the ModuleEditLinks out of the H2 or wrapping them in a single span inside of the H2. I would prefer them to not be in the H2 in the first place but that might break current skins.
 
HTH,
Joe D.
2/28/2011 10:41:19 AM
Gravatar
Total Posts 2239

Re: Diferent Class for Title and Edid button in Blog module

I should add that we only use this method when we need links to be present but not take up any screen real estate thus requiring them to be positioned absolutely and we need the links wrapped in a container to make that possible (in some designs).

2/28/2011 10:48:22 AM
Gravatar
Total Posts 18439

Re: Diferent Class for Title and Edid button in Blog module

Ok, I see what you want. I will add a class to the link in PostList.ascx, in BlogView.ascx there is no link so I will wrap it in a span with class blogitemtitle.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.