Hello, <div><br></div><div>Thanks for the advice!</div><div>I am stuck though on how to keep the formatting from Display Suite and only alter the field value. The node in hook_view_node is a structured array with the element '#markup' containing e.g. "<h4>Title</h4>". I'd need to just alter the value and not worry about the formatting. Any ideas?</div>
<div><br></div><div>Best,</div><div><br></div><div><br></div><div>Toon<br><br><div class="gmail_quote">On Tue, Oct 2, 2012 at 4:40 AM, Eric Chen <span dir="ltr"><<a href="mailto:eric.chenchao@gmail.com" target="_blank">eric.chenchao@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Have you tried hook_node_load()?<br>
<br>
Cheers, Eric<br>
<div class="HOEnZb"><div class="h5"><br>
On Tue, Oct 2, 2012 at 11:42 AM, Ms. Nancy Wichmann<br>
<<a href="mailto:nan_wich@bellsouth.net">nan_wich@bellsouth.net</a>> wrote:<br>
> How about hook_node_view_alter()? I've never tried it, but I'd really think<br>
> hook_node_view() would be the right place. There are also some field and<br>
> entity hooks that fire before that.<br>
><br>
> Nancy<br>
> Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King,<br>
> Jr.<br>
><br>
> ________________________________<br>
> From: toon severijns<br>
> This must be a simple thing to do but i can't seem to get my head around it:<br>
><br>
> I have got a content type 'publication'<br>
> A publication can have two possible physical formats: "normal", "electronic"<br>
> When a publication has physical format "electronic" i'd like to alter my<br>
> title field in al my view modes (i use display suite) like this "Some Title<br>
> (electronic)"<br>
><br>
> I've been trying theme_preprocess_node function but to no avail.<br>
> I've also tried hook_node_view, but there i have my title field already as<br>
> markup in an array so i can't just alter the title itsself.<br>
><br>
><br>
</div></div><span class="HOEnZb"><font color="#888888">> --<br>
> [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</font></span></blockquote></div><br></div>