Forum Moderators: open
I designed a web page from the ground up.
It's a "reviews" page.
What I need is to enable outside users to edit the page and save as a different one - using a WYSIWYG editor.
I think its called front end editing? or back end?
There would be 6 or 7 "fields" they would need to edit.
vbadvanced didn't seem to have what I was looking for.
I am currently installing Drupal and have read about Joomla and Typo 3.
Any ideas? Thanks!
If your requirement is that you want page of book and below which each of users can write the reviews , then you need comment sort of functionality.
In drupal make a page for each book which you want to get reviewed , then allow users to give comments in the form of reviews , they can use wwsiwyg editor if you install along with star ratings for the book.
I only know about drupal at present , cannot tell you how to do this is wordpress or typo3
Then you'll probably want to look into a template for your CCK node type (review). This way you can apply HTML and CSS just how you want it and get a nice looking review page.
Congratulations on choosing Drupal - I don't know why so many people on this forum mess around with anything else.
I have been doing the "reviews" template in the page node. Its been taking some time, but so far it looks good. I still need to incorporate my sidebar somehow into it. Not sure if I can edit the sidebar on the theme I am using or delete it and use a php includes - which is what I have been using.
The "reviews" section is only one part of the site. There are previews, news, articles etc. How do I make another node for those? Can I just copy the page.tpl.php and rename it to news.tpl.php and somewhere create a new node named "news" that uses that?
Yeah, Drupal is great! Going to save me a lot of time as reviewers would e-mail be their text in a .doc - I would then convert it to html via g-mail - view the source and copy the relevant content and paste it in pspad. Then upload. LOL. Can't wait!
- for presentation, you can either create a template file (*.tpl.php file) for the content type or use the contemplate module. Even if you won't use the contemplate module on the production sites, it's very useful for seeing how to call each field in a template.
- I'm not sure I follow on the imagecache/imagefield thing. Basically two ways to go
1. Use the img_assist module in the "body" (which can be renamed) and allow the user to place the image anywhere she wants.
2. Figure out the name of the imagefield (again, contemplate module useful here) and put it in a particular place in your template if you want, say, a book cover in the same spot on each page.
The "reviews" section is only one part of the site. There are previews, news, articles etc. How do I make another node for those? Can I just copy the page.tpl.php and rename it to news.tpl.php and somewhere create a new node named "news" that uses that?
Well you have to think about what you're doing here. In general you will probably want to create more node-nodename.tpl.php files than you will page-pagename.tpl.php files.
Page.tpl.php is what holds the outer shell of your site while node-node_name.tpl.php can format specific content types within a page.
Now if you want news to have a completely different layout than normal, yes you would want to copy page.tpl.php to news.tpl.php. And you would still probably want to create a node-news.tpl.php file that styles each individual news article no matter how you do it.
I only use page templates in two spots - page-front.tpl.php for the homepage. It has a completely different layout than the rest of the site and the content is all static. Ane payment-receipt.tpl.php where I wanted basically just the header logo and payment information. No search bar, no footer links, etc..
I have about 5 or 6 node-node_name.tpl.php files. One for job listings so each job listing shows 5 header sections (if they were filled out). Another for our main content type. Another for news & events. Another for testimonials. And a few more. And the rest of the site is just free form Page content types.
One other thing - is there any way to link an image so it opens in a new template?
Example -
Reviewer uploads pic that is 1200x1800.
On the review page it gets resized to 180x270.
Is there a way when that resized image is clicked it could open in a new template at 960x1440?
How do I get a node to reference a different Page.tpl.php?
I created a 'News" node and a news.tpl.php.
How do I get that News node to use the news.tpl instead of the page.tpl?
Do I need to make a node-news.tpl.php? I did that but its still referencing the page.tpl.
Basically I just want to create new pages using a different template.
In the celju template I used this code:
function phptemplate_preprocess_page(&$variables) {
// IF THIS IS NOT WORKING BE SURE TO CLEAR THE THEME REGISTRY.
// FAILURE TO DO SO WILL NOT ALLOW THIS FUNCTION TO BE CALLED.
if($node = menu_get_object()) {
$variables['node'] = $node;
$suggestions = array();
$template_filename = 'page';
$template_filename = $template_filename . '-' . $variables['node']->type;
$suggestions[] = $template_filename;
$variables['template_files'] = $suggestions;
}
}
and took out:
function _phptemplate_variables($hook, $vars = array()) {
switch ($hook) {
case 'node':
if ($vars['page']) {
$vars['template_files'] = array('node-default-page', 'node-'. $vars['node']->type .'-page', 'node-'. $vars['node']->nid .'-page');
}
else {
$vars['template_files'] = array('node-'. $vars['node']->nid);
}
break;
}
return $vars;
}