0

I developed the layout of the first page in page.tpl.php. Here I've created some regions, to put the blocks. The problem is that these blocks reflect my "content type", and it has a link that when i do to click, don't happens the linking.

I would like to link to a page with a different layout but I do not know where to set the second layout and how to redirect the link to this page. thank you!

EDIT

the layout of the content type is level node (node.tpl.php), while the layout of the first page I set it at page (page.tpl.php). Going on the first page, I find a link within the block that should bring to the page of the node, but does nothing ...

As you can see, the title is my link to the node: enter image description here

EDIT

in the layout of my first page I removed the "content", this may be the error?

1

copy page.tpl.php to page--node--1.tpl.php for node with id 1, then edit it as you want. node.tpl.php theming the piece between sidebars/header/footer place only.

  • I set the page "front page" to "localhost/drupal5/node/1" got an error message: "Error message The path 'node / 1' is invalid or Either you do not have access to it. " – Antilope Jul 3 '12 at 11:11
  • for "front page" make copy of page.tpl.php and rename it to page--front.tpl.php – svetlio Jul 3 '12 at 16:12
2

Custom content types are should be themed at the node level. Add a node template file to the theme/templates directory according to your content type. For example, I have a "Trip" content type. This gets themed with a node--trip.tpl.php file.

You don't need to do anything special to redirect.

  • 1
    yes but how do I get different layouts in my drupal site? – Antilope Jul 2 '12 at 15:26
  • What do you mean "different layouts"? Isn't the question about having different layouts for different content types? Maybe you can post your code to help me understand what you're trying to do. – kevinmcg Jul 2 '12 at 15:30
  • So this sounds like an issue with the link rather than any theming. What is the code for the page.tpl.php and what is is the resulting HTML (view source) for the link? – kevinmcg Jul 2 '12 at 15:39
  • Perhaps you're right, but how can I do? I thought that my node is inserted into a new page. I thought then there was the possibility of adding a second file page.tmp.php... – Antilope Jul 2 '12 at 15:43
  • that's not the right link : localhost/drupal5/node/8 in html code. – Antilope Jul 2 '12 at 15:48
1

I am experimenting now with creating different responsive layouts for different parts of a commerce site I'm developing. I'm using the Omega theme with Omega Tools module to generate subthemes. I created one subtheme for global site css and templates and am creating a subtheme of my "global subtheme" for each different section of the site that uses its own layout. Then I'm using the Delta and Context modules to set the actual theme in use for each section of the site. It might seem heavy handed to change themes per section of the site, but the advantage is that each theme can use the Omega settings interface to arrange its layout. I haven't looked at performance or maintainability but it looks like this is going to accomplish layout-per-site-section and build a responsive site to boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.