[development] The Mestopheles path
merlin at logrus.com
Tue May 3 16:51:50 UTC 2011
On 5/2/2011 5:34 PM, jeff at ayendesigns.com wrote:
> A D6 site using panels. A view producing a block. The panel page loads
> the block and overrides its path (well...technically not, but that's
> what the setting says) to be domain.com/music
The 'override path' really means to change the "view path" so that when
you click on something in the view (such as an exposed filter or a more
link) it goes to the path you specify. It doesn't change anything in
arg(0) or $_GET['q'].
> Have a module that implements pre-process, as well as registering a
> callback. The path in the callback is /music-xml. The pre-process
> implementation checks for arg(0) containing music-xml. The module
> registers its templates directory, which contains a template for
> page-music-xml.tpl.php. When invoking /music, the result is the
> callback or music-xml fires, arg(0) contains music-xml, and the template
> fires. The browser path, meanwhile, still says /music
> The problem is that I need to change the content type used in the view
> from music to something else, at which point it all breaks...arg(0)
> shows up just as music then, not music-xml.
> I've grepped the code, exported and grepped the db, clicked all the
> clickables (I think) in panels, check path aliases, strongarm ... I
> can't figure out how it's being done.
I can't either. The thing to check is aliases, since aliases are the
biggest source of confusion about path. But if it's aliases I can't see
how changing the view would affect it in the slightest.
arg(0) looks directly in $_GET['q'] -- I can't imagine anything that's
actually going to change $_GET['q'] to look like music-xml when the path
is in fact music. So there's got to be something custom, somewhere,
that's doing it.
More information about the development