tags:

views:

220

answers:

1

It's perhaps a common task to create a subsection on site, which will reside under sitename.com/subpath.

The subsection will contain own menu with a few links (Calendar view, Add MyEvent content type form, Table View).

But clicking these links will lead out of this /subpath.

Is there a know solution for this (to stay in subsection)?

Or it's normal to use custom code to manage such a subsection, e.g. create pages under /subpath with custom PHP code that will load CCK forms (drupal_get_form())?

Also, is it a tolerable solution to modify from "View links to node forms" to "View links to /subpath pages with programmatically created node forms"?

+1  A: 

I'm not sure I completely understood your question - if I didn't and I'm off-topic, I apologize in advance.

Anyway:

  1. Creating pages with code in them using PHP filter, is never accepted practice. There's a reason why the filter was moved to its own module in 6.x - so you can turn it off altogether.

  2. You can go to Site building->URL aliases->Create alias and point the wanted system paths (say, node/add/mycontent) to your subsection path (say, mysection/add/mycontent). All the links to the system path should change to the new alias.

EDIT:

Also, check out pathauto and Sub-path URL Aliases for paths like node/1 and node/1/edit

Eli Krupitsky
I read the Question as asking about theming and block placement by path. Therefore, path aliasing is the simplest solution.
Grayside