hi I decided to remove the logo php code and go for a region that will host the image of my logo/name. I can easily add an image via css to the region class but to have a link bringing back to "home" i have to use html code in a block added to that region.That works but i d like, if possible to use php page.tpl.php and/or css to place the linked image, how can i accomplish that? thanks Simone
I'm a little confused by what you're asking. I don't think you really need a region unless you plan to put blocks in it. You can just link to $front_page in your theme's page.tpl.php using whatever image or text you like.Brian
On Wed, Dec 10, 2008 at 10:03 AM, simone-www. io-lab. org cimo75@gmail.comwrote:
hi I decided to remove the logo php code and go for a region that will host the image of my logo/name. I can easily add an image via css to the region class but to have a link bringing back to "home" i have to use html code in a block added to that region.That works but i d like, if possible to use php page.tpl.php and/or css to place the linked image, how can i accomplish that? thanks Simone
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
On Thu, Dec 11, 2008 at 12:44 AM, Brian Choc bchoc@t4tcolorado.org wrote:
I'm a little confused by what you're asking. I don't think you really need a region unless you plan to put blocks in it. You can just link to $front_page in your theme's page.tpl.php using whatever image or text you like. Brian
hi Brian I ve tried to mangle with php code (i am quite new to it) but i can t find out the right syntax (i copied the code from the original logo and adapted it but with no luck) Can you point me out to an example? Thanks Simone
On Wed, Dec 10, 2008 at 10:03 AM, simone-www. io-lab. org cimo75@gmail.com wrote:
hi I decided to remove the logo php code and go for a region that will host the image of my logo/name. I can easily add an image via css to the region class but to have a link bringing back to "home" i have to use html code in a block added to that region.That works but i d like, if possible to use php page.tpl.php and/or css to place the linked image, how can i accomplish that? thanks Simone
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
You could do something as simple as: <a href="<?php print $front_page ?>">Your text or picture here</a>
You may want to add check_url to the php, or rel or title attributes to the link tag, but I think that's the most simple link back to home page.
Alternatively, here's the code from the core theme Garland. if ($logo || $site_title) { print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">'; if ($logo) { print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />'; } print $site_html .'</a></h1>'; }
Here they've done basically the same thing but are including variables for the logo and site title and also checked to make sure the title and logo are present before trying to display them. Also, Garland puts the HTML inside the PHP, where my example put the PHP inside the HTML.
That said, there are lots of themes you can check to see different approaches to how it's done. Brian
On Wed, Dec 10, 2008 at 8:17 PM, simone-www. io-lab. org cimo75@gmail.comwrote:
On Thu, Dec 11, 2008 at 12:44 AM, Brian Choc bchoc@t4tcolorado.org wrote:
I'm a little confused by what you're asking. I don't think you really
need
a region unless you plan to put blocks in it. You can just link to $front_page in your theme's page.tpl.php using whatever image or text you like. Brian
hi Brian I ve tried to mangle with php code (i am quite new to it) but i can t find out the right syntax (i copied the code from the original logo and adapted it but with no luck) Can you point me out to an example? Thanks Simone
On Wed, Dec 10, 2008 at 10:03 AM, simone-www. io-lab. org <
cimo75@gmail.com>
wrote:
hi I decided to remove the logo php code and go for a region that will host the image of my logo/name. I can easily add an image via css to the region class but to have a link bringing back to "home" i have to use html code in a block added to that region.That works but i d like, if possible to use php page.tpl.php and/or css to place the linked image, how can i accomplish that? thanks Simone
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
That really helped, thanks. Simone
<a href="<?php print $front_page ?>"> <img src="http://www.mysite.com/myimage" id="section-top-left" </a>
On Thu, Dec 11, 2008 at 10:14 PM, Brian Choc bchoc@t4tcolorado.org wrote:
You could do something as simple as: <a href="<?php print $front_page ?>">Your text or picture here</a> You may want to add check_url to the php, or rel or title attributes to the link tag, but I think that's the most simple link back to home page. Alternatively, here's the code from the core theme Garland. if ($logo || $site_title) { print '<h1><a href="'. check_url($front_page) .'" title="'. $site_title .'">'; if ($logo) { print '<img src="'. check_url($logo) .'" alt="'. $site_title .'" id="logo" />'; } print $site_html .'</a></h1>'; } Here they've done basically the same thing but are including variables for the logo and site title and also checked to make sure the title and logo are present before trying to display them. Also, Garland puts the HTML inside the PHP, where my example put the PHP inside the HTML. That said, there are lots of themes you can check to see different approaches to how it's done. Brian On Wed, Dec 10, 2008 at 8:17 PM, simone-www. io-lab. org cimo75@gmail.com wrote:
On Thu, Dec 11, 2008 at 12:44 AM, Brian Choc bchoc@t4tcolorado.org wrote:
I'm a little confused by what you're asking. I don't think you really need a region unless you plan to put blocks in it. You can just link to $front_page in your theme's page.tpl.php using whatever image or text you like. Brian
hi Brian I ve tried to mangle with php code (i am quite new to it) but i can t find out the right syntax (i copied the code from the original logo and adapted it but with no luck) Can you point me out to an example? Thanks Simone
On Wed, Dec 10, 2008 at 10:03 AM, simone-www. io-lab. org cimo75@gmail.com wrote:
hi I decided to remove the logo php code and go for a region that will host the image of my logo/name. I can easily add an image via css to the region class but to have a link bringing back to "home" i have to use html code in a block added to that region.That works but i d like, if possible to use php page.tpl.php and/or css to place the linked image, how can i accomplish that? thanks Simone
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]
-- .wmv , .wma , .pps along with all proprietary Windows formats won t be accepted and/or viewed.... -- [ Drupal support list | http://lists.drupal.org/ ]
-- [ Drupal support list | http://lists.drupal.org/ ]