First I'm not sure if I'm writing in the right section... please point me somewhere else if needed.

- Suppose you have registered in your custom module a path through hook_menu: for example "my-custom-path/%"

How can you customize the page served by such a path?
I mean:
- I would like 2 columns layout (50%-50% of the page width) for that path (while the default for all the other urls in the site is 3 columns)
- I would like some specific blocks to appear only on that path

So far I got 2 proposals:

1) Hook_theme and my-custom-template.tpl.php

As far as I understood it is not the right answer: it would work but it will not be efficient: the system would load first all the blocks anyway (and then in the template I could choose the ones I need to display). Not efficient. (see here to undertand better what I mean http://www.lullabot.com/articles/drupal-performance-tip-block-visibility)

2) Registering the path in Panel.

This is what I tried to do! :) But Panels3 does not allow me to do so.
Kars-T (see first comment below) said because "it will respect any other path in the system and will not override it if not forced to".
Can I force it? How?

Thanks

Comments

kars-t’s picture

Status: Active » Fixed

Hi

first panels: Panels better said the ctools pagemanager module is setup to override some specialcases like the terms page. But it will respect any other path in the system and will not override it if not forced to. So this is normal behaviour.

The other thing is I don't understand what you want to achieve. If you want to theme the output use hook_theme() register a template and use that. If you want to use panels register the path with panels and setup your blocks. You could provide a block or a custom panel pane for your data and display it like this.

I know this is very(!) difficult stuff for a newcommer and loads to learn. But it is worth it. Try to contact your local usergroup and start learning :) IRC is a great place to get quick support as well.

diego.pasc’s picture

Status: Fixed » Active

Hi Kars-T,

I edit the issue content to make it easier to understand

kars-t’s picture

Status: Active » Fixed

Hi

from rereading I come to believe the best thing you can do is to use panels everywhere. This will easily give you the power to use a different site layout for any circumstances.

The override thing is different with panels. You shouldn't write menu call back but let panels handle the menu stuff and create a block or panel pane. Forcing panels to always override paths will only give you the panel as output and not your module any more. This is not what you want.

Again this is not an easy task. I recommend that you should contact the local usergroup or a local drupal store so they can help you out. Go to a camp or con an join a panels session. I can't support a complex use case like yours by an drupal.org issue. Sorry

And please don't edit the original post but write a new comment so it is clear what is going on.

diego.pasc’s picture

Hey Kars-T,

I've just found out we met last monday in Hamburg for the Drupal meeting at Betahaus!!!
And at that meeting, by coincidence, I asked just to you about this issue! What a coincidence! :)
So... thanks twice for the support!

I'm just investigating better Ctools plugin system to create content (i.e. panes) for Panel3.
Thanks a lot! ;)

See u soon

Diego

kars-t’s picture

Lol! :D Okay see you around!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

Make the issue simpler