Posted by fas.khan on December 24, 2012 at 7:24pm
Hi,
I have a drupal site at hand which shows a Title and Introduction from Content in the admin.
It has the code as below:-
<div class="node-inner">
<?php if (!$page): ?>
<!--<h2<?php print $title_attributes; ?>><a href="/assessment/case-library"><img src="<?php print base_path() . path_to_theme(); ?>/images/casesarrow.png" align="absmiddle" /></a> <img src="<?php print base_path() . path_to_theme(); ?>/images/booksml.png" align="absmiddle" /> <a href="<?php print $node_url; ?>"><?php print $title; ?></a></h2>-->
<?php endif; ?>
<?php print $user_picture; ?>
<?php if ($display_submitted): ?>
<span class="submitted"><?php print $date; ?> — <?php print $name; ?></span>
<?php endif; ?>
<div class="content">
<?php
// We hide the comments and links now so that we can render them later.
hide($content['comments']);
hide($content['links']);
print render($content);
?>
</div>What I am really hoping for is to add a submit button and a Text field for anyone who is not admin. But I am not sure where to put the code for it.
Could anyone help me with it.
Where is render($content) going and fetching the data?
Thanks a lot.
Comments
What is the purpose of the
What is the purpose of the form (the text field and submit button)?
Just to send email to the
Just to send email to the admin that the information has been seen and is validated.
any help. I just need to add
any help. I just need to add a text field and a button.
Many Thanks.
You can create a custom block
You can create a custom block and assign it to any region wherever you want.
If you know how to create custom block, then it should be done very quickly.
-Imran
Use web form
As imran said you can use custom block for this. if you are not a developer, use web form to create a custom form. web forms can be put to the block.