Development

#3243 ([PATCH] sfSimpleCMSPlugin -> mainNavigation does not pass a default culture in uri)

You must first sign up to be able to contribute.

Ticket #3243 (new defect)

Opened 8 months ago

Last modified 1 month ago

[PATCH] sfSimpleCMSPlugin -> mainNavigation does not pass a default culture in uri

Reported by: onanga Assigned to: Kris.Wallsmith
Priority: minor Milestone:
Component: sfSimpleCMSPlugin Version: 1.0.12
Keywords: simpleCMS culture, sfSimpleCMSTools, urlForPage Cc:
Qualification: Unreviewed

Description

In some case, clicking on a link generated by mainNavigation component may lead into a 404 error. That happens when no culture is set yet.

To correct this, replace your /plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/templates/_mainNavigation.php content with this one below :

<ul class="site_navigation">
<?php foreach ($level1_nodes as $node): ?>
  <li <?php if ($node->getSlug() == $page->getSlug()): ?>class="current"<?php endif; ?>>
    <?php echo link_to(
      $node->__toString($culture), 
      sfSimpleCMSTools::urlForPage($node->getSlug(), null, $culture),
      array('class' => 'cms_page_navigation')
    ) ?>
  </li>
<?php endforeach; ?>
</ul>

Or download filed attached and replace your /plugins/sfSimpleCMSPlugin/modules/sfSimpleCMS/templates/_mainNavigation.php

Attachments

_mainNavigation.php (390 bytes) - added by onanga on 03/31/08 15:15:14.
patch

Change History

03/31/08 15:15:14 changed by onanga

  • attachment _mainNavigation.php added.

patch

10/31/08 19:36:20 changed by Kris.Wallsmith

  • owner changed from francois to Kris.Wallsmith.