Hello All -

I'm hitting the Drupal wall pretty hard here. What I would like to accomplish, hopefully in my lifetime and with Drupal :) - is to set up a custom page where users will submit a product review.

I've read a ton of tutorials on setting up custom pages and some make it sound as simple as copying and renaming the tpl.php pages. I did create a page (or node?) named "review" by going to Content Management/create content/page and giving it the node name of review.

Yet when I choose that page I see fields I don't want to show - such as Menu Settings and URL Path Settings. How do I get rid of those? I did copy and rename the pape.tpl.php file to page-review.tpl.php - that didn't seem to do anything. I did the same with the node.tpl.php page and still no results with a simple CSS style change.

I tried the Custom Page module but then ran into the question of how do I add custom fields with CCK (or can I?) such as Five Star Rating.

I don't have any if this online as there really isn't anything to show but a mess at the moment. I did post a jpg of how I would like the page to look after a user submits a review. That can be seen here: http://www.fractalrust.com/gc/.

Any shove in the right direction would be greatly appreciated. I've been working on this project longer than I care to admit and I'm starting to think maybe I've bitten off more than I can handle. On the other hand - if I get this then I will really feel like I have finally broken through a major Drupal wall.

Sorry for the long post!

Thanks,
Kecia

Comments

tdimg’s picture

oh well, you seem to have not grasped the basics of Drupal yet, such as what a node is and what content types are.

Just some explanation that hopefully explains a few things:
Page is a content type. Create content > Page, creates a new node of the content type Page.

page-review.tpl.php deals with how the actual content of content type review is displayed, not the node add/edit form.

To advance with what you want to do:
you need to create a new content type, call that review (from what you say, you might have done this, but you're a bit confusing on this site, you really should spend more time reading the documentation), add there all the CCK fields you need. then in User management > Permission, you assign specific permissions to the user groups, such as Create [YOUR CONTENT TYPE]. Somewhere on that page you also find permissions for the Path module, not setting the permission create url alias prevents URL Path Settings from showing up on the node creation form (note, you as the user/1 will see everything). You'll see something similar for the menu module. There's also a module that cleans up the form a bit better I just can't think of it.

Hope that clarifies everything a bit - if not, I'd really suggest you read the documentation a bit more, including the Drupal terminology page (http://drupal.org/getting-started/before/terminology) and the CCK documentation.

limbovski’s picture

Hi, I'm new here too but hopefully this will help.

The page you create is a 'node' called Review. You might want to create a custom content type for Reviews.

To create a custom page 'type' you need to install the CCK Module. You can then create a custom content type consisting of whatever fields you desire. So for example you might add a type for reviews of music with a custom text field that allows users to rate the artist and also a drop down list for the hate / like / love. Then to 'theme' the display of this content type you would create a tpl.php file named in this format page-.tpl.php so in this case: page-review.tpl.php.

To 'theme' a node (node-custom.tpl.php) it's similar, you need a custom content type again but the template files are slightly different. Here is a good podcast http://mustardseedmedia.com/podcast/episode5. In short - copy node.tpl.php into your theme directory (this is what gave him problems in the video). You can get this in the Garland folder or from an existing theme (i think). Then you create another tpl.php file - node-song.tpl.php however in this case, the word song is the machine readable name you gave your custom content type.

You might find it useful to install the Devel module and in your node-custom.tpl.php file put the code dpm($node); or simply print_r($node); to see what's in the node for you to customise.

I'm not quite sure of the advantages of choosing to customize a node vs. a page. Hope this helps.

Kecia’s picture

Thanks for the link to the podcast. Pretty much everything that was mentioned above I have done, added fields with CCK, created a page-review.tpl.php, etc.

Maybe I'm overthinking this :)

I'll give it another shot in a bit

Thanks for your help!

Kecia

tdimg’s picture

so, nothing what I said made any sense to you?