I am just looking for confirmation, of what can be done and if i am on the right track, i am no expert at this but the clues may point me in the right direction

I have about 1000 data records in CSV format, i would like to import into CCK, From what i have read elsewhere this is fairly easy, so shouldnt be a major problem. I am thinking of using Contemplate for formatting the node for viewing, and views for filtering the nodes, but have a few Questions

1, If i use a Taxonomy, is there a way to store the Taxonomy name in a field in CCK, It just happens that i uses some taxonomy for categorising, but the same information is relevant content of a node, so needs to be displayed (it also cuts down spelling errors)

2, Can I use Contemplate to format the output so that Field Name and Content are side by side
so i can have a table format?

3, If one of the CCK fields contains a file name such as 'image_thumbnail.jpg' can i have Contemplate display that image using 'defined path/image_thumbnail.jpg' ( files are uploaded via FTP)

4, In 3 above could I link the image to a full size version of that image, buy just dropping the '_thumbnail' and adding the appropriate code

5, Is it possible to have more than one Template for a content type. i.e. you may want to use some of data in one format and another combination in another format. Unfortunately I suspect this is not possible

6, Are there any known issues in using 'views' to retrieve the information if i do the above

Any guidance would be appreciated, as once i know something can be done, i can then look into the how.

Comments

benedett’s picture

#5 I don't know about. 1-4 are things you can probably do with contemplate. (I'm doing something like #3 with contemplate myself.)

ramoen’s picture

You can have different teaser/full node templates if that helps

Lowell’s picture

In my limited experience, it sounds like you are on the right track.

1. I prefer not to use taxonomy for applications like this. Instead I create another content type and populate that content type with nodes that represent my taxonomy terms, then use node_reference to reference those node titles from the CCK fields. It works like any other CCK field but you can't create new nodes on the fly like you can create new taxonomy on the fly. I then use CCK view_reference to link a view to each referenced node. The view will filter arguments from the referenced nodes to filter a list of the type of content I might want to show on that page. This simulates the function of clicking on a taxonomy term and getting a list of all the nodes using that taxonomy.

2. yes! but also look into themeing

3. yes. depending on how you are going to input the image name information it should be easy

4. yes again

5. I don't know if contemplate can do this but..... I use the themeing features of drupal. What I especially like about contemplate is that it gives an inside view of the variables available for to a node. A few possible problems though (and this is not a complete list). Using views limits the available fields but can be overcome with the node_load() function. Also using the printr($node) function on a development site will show all the $node arrays and there values in one big list.

This might sound confusing or poorly written but it works great giving much more control and flexibility. I was just getting bogged down trying to fit into the taxonomy way of presenting everything.

As an overview, I do use contemplate, mostly for quick themeing to get things close to the way I want them, then I use the theme template.php and page.tpl.php and node.tpl.php with switches and conditional statements to direct drupal to the page-example.tpl.php and node-example.tpl.php files that I want for those conditions.

Instead of taxonomy I try to create a node type (let's call it 'term nodes') and populate it with nodes representing my terms and containing any content appropriate to that term, including a list of other nodes using the same term by using cck view_reference and passing arg (usually the %nid) to views to create my list. I then reference the term nodes with cck node_reference thus linking any content to that term which in turn links that term to all linked content (via the views created previously). From here you are limited only by your imagination.

These methods require some php and themeing knowledge. They appear to give me a lot of flexibility and control with few limitations.
If anyone can show my an easier or more effective way please let me know.

gluck with drupal

Anonymous’s picture

Thanks for the reply, it has given me some things to think on.

Time for me to start experimenting , one piece at a time