[support] include external php
Lucas J. González
lucas at lucasj.es
Sun Jan 20 22:09:32 UTC 2008
El 0, Philippe Jadin <philippe.jadin at 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.
--
Lucas J. González
More information about the support
mailing list