0
  1. I have a custom content type for Real Estate
  2. I have a custom view on the homepage that displays the 5 most recently added real estate properties and displays basic information about this property

This view is in a block on the home page.

I essentially want to put a button on these teasers that links to the full node for the user to view. I'm not sure what the easiest way to do this is?

Then, once in the full node I want to have a button that 1. Checks if the user is logged in (using php session or however that is handled with drupal) and then 2. if user is logged in it directs them to another page or if not logged in directs them to log in.

1 Answer 1

0

I would check out Display Suite's custom fields capability.

It allows you to create custom code "fields" that can be attached to nodes and other entities, and can be included in views. These fields can be, for example HTML code with tokens to create links that redirect user to the full node.

These fields also have the capability of accepting php code, which would allow you to evaluate if the user is logged in and include logic to redirect to the appropriate place. Check out the tutorial for custom fields here: https://drupalize.me/videos/display-suite-fields?p=1141

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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