[drupal-devel] [bug] xtemplate mission does not work with an alias
Anonymous
drupal-devel at drupal.org
Thu Jan 27 17:43:16 UTC 2005
Project: Drupal
Version: 4.4.1
Component: theme system
Category: bug reports
Priority: normal
Assigned to: Anonymous
Reported by: kbahey
Updated by: Anonymous
-Status: duplicate
+Status: patch
This was not fixed by the patch to the other issue. What needs to
happen here is:
variable_get("site_frontpage", "node") needs to become
drupal_get_normal_path(variable_get("site_frontpage", "node"))
I'm not on a workstation where I can post a real patch at the moment,
but this is a very simple change, so I'm changing the status.
Anonymous
Previous comments:
------------------------------------------------------------------------
May 11, 2004 - 02:18 : kbahey
When using xtemplate, and setting "xtemplate_mission" to a value (under
"Message on front page" on /admin/system/themes/xtemplate), the mission
does not appear if the /admin/system "Default front page" is set to a
url alias.
So, if the front page should be set to "node/view/8" for example, and
there is a url alias for that node (say: "index.html"), then the
mission will not show up.
The culprit code is in xtemplate.theme
[?php // only parse the mission block if we are on the frontpage ...
if ($_GET["q"] == variable_get("site_frontpage", "node") && ($mission
= variable_get("xtemplate_mission", "edit mission"))) {
$xtemplate->template->assign("mission", $mission);
$xtemplate->template->parse("header.mission");
}
?]
_GET["q"] does not contain the alias ("index.html"), but the original
node ("node/view/8")
Of course, the workaround is easy (put the node and not the alias as
the front page)
However, it is best to be consistent across the entire system, and
treat the alias exactly as the original node.
------------------------------------------------------------------------
July 27, 2004 - 16:15 : JonBob
Folded into http://drupal.org/node/view/9477.
--
View: http://drupal.org/node/7685
Edit: http://drupal.org/project/comments/add/7685
More information about the drupal-devel
mailing list