1

I've been making a content type page for my Drupal 7 website. I'd like to see an option to disable the 'read more' and the 'link' to the /node/x in the content type customization. I just want it to be displayed on the home 'as is'.

Is that possible?

1

You can use the Display Suite module, which allows controlling fields shown in different view modes for a content type.

Display Suite allows you to take full control over how your content is displayed using a drag and drop interface. Arrange your nodes, views, comments, user data etc. the way you want without having to work your way through dozens of template files. A predefined list of layouts (D7 only) is available for even more drag and drop fun!

1

You can do this by removing the "teaser" mode and tweaking node--your_content_type.tpl file.

To remove the teaser mode: Go to "Structure > Content types > your content type"; click on "Manage display" and "Custom display settings"; uncheck the "Teaser" checkbox.
This will display the content in the front page as is.

screenshot

Now to remove the "read more" link, unset it in your node--your_content_type.tpl.

unset($content['links']['node']['#links']['node-readmore']);

This way you will not have "read more" link in your home and the whole content will be displayed for your content type.

0

You can remove links just by using hook_node_view_alter()

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.