0

In drupal 7 I created new content type and also created new view to display nodes of this content type. After playing a bit with Calendar module I managed somehow to put link to calendar to node teaser links. Now I can see "Read more" link inline with "Calendar" link. It's pointing to calendar view which no longer exists.

Could you please advise me how to get rid of this "Calenar" link in teaser links? When I uncheck "Display links" in view settings (Edit View -> Format -> Show -> Content | Teaser), it disappears together with "Read more" link. But I'd like to have "Read more" link without "Calendar" link.

Thanks for any suggestions.

0

Uncheck the Display links and add the below line in your node.tpl.php present under your themes folder sites/all/themes/yourtheme

<a href='<?php print $node_url; ?>'>read more..</a><br/>
|improve this answer|||||
0

If you unchecked the Display links from the view, then you can display the read more link in your node template file.

You need to create node template for your content type like node--[contenttype].tpl.php where contenttype is your content type, in your theme directory and clear the cache.

You can add below code in node template for your content type to display links read more only in teaser view.

if ($teaser) {

 print render($content['links']['node']);
}

There is another method for the same.

You can select content as format in your view and can add title, Content: Link fields in your view.

|improve this answer|||||
0

Thanks, guys, for your suggestions.

When my problem appeared, I didn't modify any tpl files, so I felt this has to be solved in some other way. When I removed this content type and view and recreated them again, calendar link was still there.

So I removed it again and created a dump of my DB. I was fulltext searching for that content type name and I found it.

In table variable there was variable with name calendar_date_link_<my content type name>. I removed it and calendar link disappeared. I hope this hasn't broken anything else.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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