I am in a bind customizing a drupal website.

I am stuck using frames :( for one portion of the website.
To accommodate exiting the frame, I need to add the
target="_top" attribute to the URLs for the primary links.

I tried modifying the $primary_links variable in my
page.tpl.php without success.

Does anyone have any suggestions? Thanks!

Comments

kayfish’s picture

I worked on this hours yesterday, and wouldn't you know it -
I got it working just after I posted this issue.

I added the following piece of cide to the menu section of the template.

<?php if (isset($primary_links)) { ?>
  <div id="primary">
    <?php $primary_links = str_replace( 'href', 'target="_top" href', $primary_links); ?>
    <?php print theme('links', $primary_links) ?>
  </div>
<?php } ?>

Maybe there's a better way, but I only know how to hack at the moment.

bradlis7’s picture

Status: Active » Closed (fixed)

I looked around a little bit, but your solution seems to be best. Feel free to reopen this if you need to, but I'm assuming you've got this figured out.