I want to use render function but I don't want to show all the data which is there in the particular field. So how can restrict something from rendering in template file. Scenario is:
I have reference one field to another contentype, and I am rendering field in template file. But problem is even though the referenced node is not published, that data is displaying in the rendered field. So how can I restrict like if node is published then only I want to display that data.
One more concern is if it is possible with inbuilt functions only that will be great that saves my time of writing code and designing the data.