Dynamic User Menu Link

Hello,

How can I create link like Drupal.org homepage main menu:
- when its anonymous user there is link "login" on the main menu
- when its authenticated user there is link "your dashboard" - dynamic ling $user->uid to the view?

I created a view:

Contextual filters
(author) User: Uid

Specify validation criteria
Validator
PHP validate code

global $user;
return $argument{0} == $user -> uid; 

Relationships
Content: Author

SA-CONTRIB-2011-029 - Taxonomy Filter - Cross Site Scripting

  • Advisory ID: DRUPAL-SA-CONTRIB-2011-029
  • Project: Taxonomy Filter (third-party module)
  • Version: 6.x, 7.x
  • Date: 2011-July-20
  • Security risk: Moderately critical
  • Exploitable from: Remote
  • Vulnerability: Cross Site Scripting

images missing when using alias'

I've got an interesting issue. I'm using the basic article content type and in the body of the text are some images and also added tags to the articles.

The issue comes in when I click on a tags link the articles body does not display the images. As extra path is being added to the image link "content" and "tags" this stops the images from displaying. If I add a ../ to the images path then the image can be seen when navigating to the page via a tags link but dosent show the images when navigating directly to the node, plus when editing the article the images don't show.

Include revision history on a template (tpl)

Hi,

I'm using print module (http://drupal.org/project/print). It has a template (print.tpl.php) that is in charge of the node layout when printing (printer, pdf, etc).

What I'm trying to do is to include the revision history on it. Is it possible? How do I do it?

Any advice is welcome.

TIA,

Bob

HTML Tags on a 'Basic page' not working

Hi.

I am new to Drupal so forgive me if the question is very basic.

I have installed Drupal and created a 'Hello World!' website based on the Bartik 7.4 theme. Now, I wanted to add some HTML tags(img, h2, a) to one of the pages so I went to Content > Page name(edit), selected 'Text format' > 'Full HTML' and sarted writing my code. When I finished it looked similar to this:

Zen - Empty space

Hey there guys,

although I've been coding PHP for quite a while now, I'm relatively clueless when it comes to Drupal and Drupal themes.
I've decided to use Drupal for a little project and create a custom theme for the website. I'm using latest version of Zen and Drupal 7.4.

Here's the problem:

I've modified page.tpl.php to move the main menu to #header instead of #navigation. What I'm trying to achieve is a main menu positioned to the right of my logo. Here are the modifications:

<div id="header">

// Unrelated stuff

<?php if ($main_menu): ?>
	<?php print theme('links__system_main_menu', array(
          'links' => $main_menu,
          'attributes' => array(
            'id' => 'main-menu',
            'class' => array('links', 'inline', 'clearfix'),
          ),
          'heading' => array(
            'text' => t('Main menu'),
            'level' => 'h2',
            'class' => array('element-invisible'),
          ),
        )); ?>

	<?php endif; ?>

</div>
// More unrelated code

<div id="content">
// Render content

<?php if ($page['navigation']): ?>
      <div id="navigation"><div class="section clearfix">
        

        <?php print render($page['navigation']); ?>

      </div></div><!-- /.section, /#navigation -->
<?php endif; ?>
</div>

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x