2

I have a need to display a node differently once a date field ('subscription expiry') of the node has passed. This is for subscription-based content. Ideally I would like to be able to choose a different Display Suite view when the alter the display of the node when the subscription expiry date is before today.

I have looked at preprocess functions and at altering the node template but have yet to find an elegant solution. The number of fields is quite high: about 35 for the full view and about 15 for the limited view. I have created corresponding DS views but I would like to find how I can alter the view according to the value of the subscription expiry field.

My workaround is to use template_preprocess_field to hide each field I want to restrict, but this seems a bit long-winded.

Any suggestions would be most welcomed!

Your Answer

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

Browse other questions tagged or ask your own question.