This forum is for assistance with theme development.

theme for cck fields

Hello. I made a new content type (name is website). And fields are;

title, (Web Site Name)

taxonomy, (tags)
technologies, (which technologies using, php, mysql, ajax etc.)

fields group - website (web site data)
websiteurl (web site url)
websiterss1 (rss)
websiterss2 (if there is)
websiterss3 (if there is)

fields group - blog (web sites blog data)
blogurl (bog url)
blogrss (blog rss)

body filter (somethings about web site)

fields group - image (web site images)
image1
image2
image3
image4
image5

fields group - Who Did It (max 5 content)
name (if it is a person his name, else company name)
url (blog or company web site url)
about him/her/it (something about him)
image (his image)

but, i cant a theme for it? i want to make;
Teaser;
-----------------------------------------------------------------
Web Site Name | FiveStar |
-----------------------------------------------------------------
WebSnap Preview | URL: web site url |

n00b Weird array addressing issue - what's wrong with my code?

Hi There -

Need some fresh eyes on this. I've got a block and I've loaded the node into it and have some strange results that I'm not sure how to interpret.

Weird array addressing issue - what's wrong with my code?

Hi There -

Need some fresh eyes on this. I've got a block and I've loaded the node into it and have some strange results that I'm not sure how to interpret.

Below is a truncated version of the print_r - I've removed bits that weren't germaine to the conversation and replaced them with '.....' What is confusing me are the [0] => and [1] => right before last comment timestamp and field_journal. I'm trying to dig out the nid of field journal.

At first, I tried:
<?php print $node->field_journal[0]->nid; ?>

Doesn't print anything.

Then I tried
<?php print $node[1]->field_journal[0]->nid; ?>
but got the following error:
Fatal error: Cannot use object of type stdClass as array in /home/devadmin/public_html/includes/common.inc(1348) : eval()'d code on line 10

I was pretty much guessing. I haven't a clue what to do next. Here's the output:


stdClass Object
(
[nid] => 378
[vid] => 387
.....
[body] => Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
[teaser] => OMG! I'm so sick of cod!
[log] =>
[format] => 3
[uid] => 21

[tags] =>
[nodewords] => Array
(
)

[0] =>
[last_comment_timestamp] => 1199867783
[last_comment_name] =>

Theming CCK Embedded media field?

Is there a good guide out there to theming CCK fields? In particular, I'd like to do a little CSS-ing to an embedded video field with a PHPTemplate theme.

Putting a Search Box Inside a Menu Block

This may be impossible and way off base (I don't understand too much of the back end to Drupal, I just manipulate code by example) but I want to replace the title of a menu black with a search box. The block is intended to be the main navigation menu and instead of labeling with the obvious "Navigation" I thought I would be ergonomic and stick the search bar there. I created a block-menu.tpl.php and replaced:

if ($block->subject):

XTemplate howto? The guide is unusable.

Hi.
The XTemplate guide at http://drupal.org/node/6493 is unreadable due to many of the example code snippets missing (namely those which are in the form of HTML comments). So I'm looking for an other guide, or for help directly in this thread.

I have come as far as having a Drupal test site up and running, with a few additional modules installed. So now I just need to make a theme, and I happen to prefer the XTemplate way.

Pages

Subscribe with RSS Subscribe to RSS - Theme development