<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bidimailui-charset-is-forced="true"
bidimailui-detected-decoding-type="UTF-8" text="#000000"
bgcolor="#ffffff">
Ah, makes sense. Ok, so that leaves me with one higher-level
question. Is there a question I should be asking myself to decide
whether to have cck manage the content type, its field and the
processing of both or to do it separately, other than which is
easier?<br>
<br>
On 01/17/2011 04:36 AM, Randy Fay wrote:
<blockquote
cite="mid:AANLkTinqK_Ej=aoYjTZfAdHgUztRH1CH__Gk=yaN=1U0@mail.gmail.com"
type="cite">The D6 node_example in Examples is the non-CCK
technique, and it adds *data* but not fields, to a node.
Presentation and data management are done in custom code.<br>
<br>
If you just need something that CCK can do, use features and CCK
(which is essentially the easier way to do #1). <br>
<br>
Both ways work, but if you *can* do it with CCK + features I would
think that would be the best technique.<br>
<br>
-Randy<br>
<br>
<div class="gmail_quote">On Mon, Jan 17, 2011 at 4:49 AM, <span
dir="ltr"><<a moz-do-not-send="true"
href="mailto:jeff@ayendesigns.com">jeff@ayendesigns.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">
<div style="direction: ltr;" text="#000000" bgcolor="#ffffff">
I find what seems to be two different approaches for
creating fields for a custom content type via a module. One
is from drewish, where the field is first added via cck
manually, then dumped with var_export(content_fields()) and
then added to the content type in the install via
content_field_instance_create(). The other is in rfay's
Example module, where Randy creates a table for the module
in the install and inserts fields into it that are what cck
would insert.<br>
<br>
I'm wondering if the latter removes the need for me to do
all the node processing from my module. Also, my content
type has one field (other than title and body) which is an
image filefield with unlimited instances, and I'm thinking
that that same method would have the field being handled by
filefield and that the method in Example would require that
I manage the _fid, _list and _data db content, etc., so if
there's a reason why this would be a better way to do it, or
why the first method wouldn't be, I'm missing it.<br>
<br>
Jeff<br>
<div>-- <br>
<p style="margin-bottom: 0in;"><img moz-do-not-send="true"
src="https://mail.google.com/mail/?ui=2&ik=584c5da64d&view=att&th=12d9217c10bab20f&attid=0.1.1&disp=emb&zw"
name="ayenlogo" valign="top" vspace="30" align="LEFT"
border="0"> <font style="font-size: 8pt;" size="1">Ayen
Designs </font><font face="Times New Roman, serif"><font
style="font-size: 8pt;" size="1"> <br>
388 Bullsboro Drive #105 · Newnan, Georgia 30263</font></font>
<br>
<font face="Times New Roman, serif"><font
style="font-size: 8pt;" size="1"> 404-271-9734<br>
Web:<a moz-do-not-send="true"
href="http://ayendesigns.com" target="_blank">ayendesigns.com</a><br>
Blog: <a moz-do-not-send="true"
href="http://theaccidentalcoder.com"
target="_blank">theAccidentalCoder.com</a><br>
Drupal: <a moz-do-not-send="true"
href="http://drupal.org/user/367108"
target="_blank">j. ayen green</a><br>
IRQ: j_ayen_green<br>
IM (Yahoo) baalwww (MSN) <a
moz-do-not-send="true"
href="mailto:baalwww@yahoo.com" target="_blank">baalwww@yahoo.com</a><br>
Skype: ayendesigns <br>
<br>
Ayen Designs is a tradename of the computer services
division of <img moz-do-not-send="true"
src="https://mail.google.com/mail/?ui=2&ik=584c5da64d&view=att&th=12d9217c10bab20f&attid=0.1.2&disp=emb&zw"
name="acmelogo" align="absmiddle"></font></font></p>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Randy Fay<br>
Drupal Module and Site Development<br>
<a moz-do-not-send="true" href="mailto:randy@randyfay.com">randy@randyfay.com</a><br>
+1 970.462.7450<br>
<br>
</blockquote>
</body>
</html>