Hi,
Is there any way of including an external (actually in drupal's root) into a drupal's node of type page without overriding css stylesheets of the original document?
Thank You
What do you want to achieve? Do you want to keep drupal node stylesheet or your external stylesheet in the php file?
In both cases, you can create a node with some php in the body and use a filter that allows php code.
Put something like this in the body of the node : <?php include('/path/to/your/file.php'); ?>
- If you dont want to include the css from the external php document, you'll probably have to remove it from the php file. - if you don't want the drupal css, you can create a custom template for this particular node in your theme. You can theme specific nodes (either for a node type or for a specific node id) - look at the theming help on drupal.org handbooks. You can also put some conditional in your theme to disable css for a particular node id
If you give more details, you might have a more precise answer
hth
Philippe
On Jan 20, 2008 1:33 PM, Lucas J. González lucas@lucasj.es wrote:
Hi,
Is there any way of including an external (actually in drupal's root) into a drupal's node of type page without overriding css stylesheets of the original document?
Thank You
-- Lucas J. González -- [ Drupal support list | http://lists.drupal.org/ ]
El 0, Philippe Jadin philippe.jadin@gmail.com escribió:
What do you want to achieve? Do you want to keep drupal node stylesheet or your external stylesheet in the php file?
Sorry. The second one.
In both cases, you can create a node with some php in the body and use a filter that allows php code.
Put something like this in the body of the node :
<?php include('/path/to/your/file.php'); ?>
This is what i have in the node body:
<?php
ob_start();
include_once "resume/index.php";
$output = ob_get_contents();
ob_end_clean();
return $output;
?>
When it shows the node, the original php takes drupal's css and looks like the main page (i.e. parts of the code which generate a <p class="footer">whatever</p> string)
- if you don't want the drupal css, you can create a custom template
for this particular node in your theme. You can theme specific nodes (either for a node type or for a specific node id) - look at the theming help on drupal.org handbooks. You can also put some conditional in your theme to disable css for a particular node id
Great :)
If you give more details, you might have a more precise answer
hth
Thank You very much Philippe, you catched it very precisely. I have a css formatted php document which i want to include in a drupal's node of type image without losing its css format. So i guess i will have to "theme specific nodes".
Thank you again for your kind help.