Hello
I am trying to allow certain portions of a node to be editable independently from that node.
Or, trying to allow a node to display a block of text, based upon something entered in some administrative section.
An example, would be a div containing special announcements, displayed on a home page.
I would like to have that section only be editable, without granting edit permission for the entire page.
I could probably do this with a view, displaying an otherwise publicly inaccessible node.
I could probably do it better using a custom designed HTML form, with a bit of PHP in the node to pull a record from the database.
Those are the two options I have thought of. However, there are probably others of which I am unaware, and maybe this is not a novel problem.
Any suggestions?
Thanks
Luke
Do you have a set of nodes that would have a portion of it editable by users with role1 and part editable by user role 2? Or is it only in the home-page that you have this requirement.
Shyamala
----- Original Message ----- From: "Luke" drupal@lists.tacticus.com To: support@drupal.org Sent: Wednesday, September 03, 2008 12:33 PM Subject: [support] Separately editable page sections?
Hello
I am trying to allow certain portions of a node to be editable independently from that node.
Or, trying to allow a node to display a block of text, based upon something entered in some administrative section.
An example, would be a div containing special announcements, displayed on a home page.
I would like to have that section only be editable, without granting edit permission for the entire page.
I could probably do this with a view, displaying an otherwise publicly inaccessible node.
I could probably do it better using a custom designed HTML form, with a bit of PHP in the node to pull a record from the database.
Those are the two options I have thought of. However, there are probably others of which I am unaware, and maybe this is not a novel problem.
Any suggestions?
Thanks
Luke
[ Drupal support list | http://lists.drupal.org/ ]
For the moment it is only in a single page. I do not see much call for needing it in pages other than the one which needs it currently.
Regards,
Luke
On Wed, 3 Sep 2008, Shyamala Rajaram wrote:
Do you have a set of nodes that would have a portion of it editable by users with role1 and part editable by user role 2? Or is it only in the home-page that you have this requirement.
Shyamala
----- Original Message ----- From: "Luke" drupal@lists.tacticus.com To: support@drupal.org Sent: Wednesday, September 03, 2008 12:33 PM Subject: [support] Separately editable page sections?
Hello
I am trying to allow certain portions of a node to be editable independently from that node.
Or, trying to allow a node to display a block of text, based upon something entered in some administrative section.
An example, would be a div containing special announcements, displayed on a home page.
I would like to have that section only be editable, without granting edit permission for the entire page.
I could probably do this with a view, displaying an otherwise publicly inaccessible node.
I could probably do it better using a custom designed HTML form, with a bit of PHP in the node to pull a record from the database.
Those are the two options I have thought of. However, there are probably others of which I am unaware, and maybe this is not a novel problem.
Any suggestions?
Thanks
Luke
[ Drupal support list | http://lists.drupal.org/ ]
I could probably do this with a view, displaying an otherwise publicly inaccessible node.
I could probably do it better using a custom designed HTML form, with a bit of PHP in the node to pull a record from the database.
Yes. Could be done with a View, a Panel (panels module) or with just a bit of PHP to use load_node to show the nodes in question, in whatever layout you want. Then each section of your page is a separate node.
HTH
On Wed, 3 Sep 2008, Fred Jones wrote:
I could probably do this with a view, displaying an otherwise publicly inaccessible node.
I could probably do it better using a custom designed HTML form, with a bit of PHP in the node to pull a record from the database.
Yes. Could be done with a View, a Panel (panels module) or with just a bit of PHP to use load_node to show the nodes in question, in whatever layout you want. Then each section of your page is a separate node.
I might like that--will have to investigate it some. Have not used PHP to manipulate aspects of drupal, only to run custom stuff of mine integrated into nodes.
Thanks
Luke
I might like that--will have to investigate it some. Have not used PHP to manipulate aspects of drupal, only to run custom stuff of mine integrated into nodes.
very simple, like:
<div id="x"> <?php $n = node_load(34); print $n->body; ?> </div>
Something like that. One for each node. :)
On Thu, 4 Sep 2008, Fred Jones wrote:
I might like that--will have to investigate it some. Have not used PHP to manipulate aspects of drupal, only to run custom stuff of mine integrated into nodes.
very simple, like:
<div id="x"> <?php $n = node_load(34); print $n->body; ?> </div>
Beautiful. The only thing that doesn't seem to happen is a filter - from either the source or enclosing node. Probably a way to do that, but I can apply external or PHP formatting until I figure out how.
Thanks
Luke
On Thursday 04 September 2008 8:19:49 pm Luke wrote:
On Thu, 4 Sep 2008, Fred Jones wrote:
I might like that--will have to investigate it some. Have not used PHP to manipulate aspects of drupal, only to run custom stuff of mine integrated into nodes.
very simple, like:
<div id="x"> <?php $n = node_load(34); print $n->body; ?> </div>
Beautiful. The only thing that doesn't seem to happen is a filter - from either the source or enclosing node. Probably a way to do that, but I can apply external or PHP formatting until I figure out how.
Thanks
Luke
Eeep!
The above code is a security hole as the body is not being escaped. Using the above code will introduce a trivially simple XSS attack vector. DO NOT do it.
If you want just certain parts of a node to be editable, use CCK fields for the separate parts and use the cck_field_perms module to control access. (That's now part of the base CCK package in Drupal 6.)