I am working with a site that uses panels for layout. One of the simpler panels we have is used to show a node with sidebars around it with other content that changes dynamically based off of the path. The node and sidebars are always the same. Let's say the node id is 10 for the node that is always shown, that does not change.
For a specific path, I would like to change t开发者_如何转开发he body of node 10, the node that is always loaded through the panel configuration.
I thought of using preprocess_page in template.php and overriding $vars['content'], but that contains all of the html for the entire panel. I only want to change the body of the node that is always contained within the panel. Seems like having to override all of $vars['content'] just to change a small piece of the html within $vars['content'] is overkill.
How can I update the body of a node, that is always loaded by a panel, for only one path?
You could create a special condition for that panel page when the url is xxx.
Another option would be to override the pane that is printing the node with a preprocess function, and alter the html there. Similar to what you were trying to do, only targeting the thing you want to alter.
精彩评论