Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
6.x-2.4
Component:
text.module
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2009 at 12:02 UTC
Updated:
14 Aug 2009 at 19:50 UTC
Hi folks,
How do I get to retrieve paragraph per paragraph in my node template? I have an article node, and I'd like to place some additional information on both sides of my textarea. For instance, on the left side the tags, and after two paragraphs the related pictures. In order to do that with CCK and CSS I have to have access to the paragraphs in my template. Something like <?php print $field_text_paragraph1 ?>. When I dsm() the field_text property, I can only retrieve the whole formatted body text.
I tried to find a solution beforehand, but I had no luck. Theme Developer also did not reveal any information.
Thank you.
Comments
Comment #1
theusualsuspect commentednobody ever came across this problem?
Comment #2
markus_petrux commentedI think you could use preg_match() and similar functions to parse the text in the field. But this is more a generic PHP programming issue than something related to CCK. I would suggest to use the development forums for advice on how to do this in PHP.
Parsing HTML is not trivial. Maybe you could try to find a module implementing an input format filter that you can use to easy this.