This forum is for assistance with theme development.

How to use IF statement to display menu on certain nodes?

Hi!

I am new to drupal, but not so new to theme development..

I tired to search for info on how to render php menu on certain pages I need, but with no luck.

I am looking to enable menu on certain pages, but I can't figure out how to ask drupal how to render it where I need?

This is expample of what I mean:

Change the main menu html output

Hi

Im trying to learn how to manipulate the html output of the main menu on the page.

- I have made a fresh install of drupal 7.23
- made a copy of the stark theme, renamed it to t1 and placed it in the site/all/theme folder
- added the theme as my default them in drupal
- created a simple page called 'About page'
So now I have on my page:

Main menu
Home About page

Id really would like to add fx.|| around the links, so it looked like this |Home||About page| or alter the

  • and
    tag in others way I would see fit.

    As I understand the api I need to create a template.php file an ad a hook?

    - So I created an empty template.php file in the t1 theme folder an added the following code:

    function t1_menu_link(array $variables) {
    $element = $variables['element'];
    $sub_menu = '';

    if ($element['#below']) {
    $sub_menu = drupal_render($element['#below']);
    }
    $output = l($element['#title'], $element['#href'], $element['#localized_options']);
    return '|

  • |' . $output . $sub_menu . "
  • \n";
    }
    But the only place that change happens is in the adminstration submenu.

    I have tried a gazillon other options of the function and also tried creating it in a page.tlp.php file, but no matter what nothing tuches the mani menu 'items'/ links.

    Finding the Class attribute of a view - creating a responsive grid.

    Hi guys.

    firstly i apologize if this is in the wrong section.

    since monday i have been learning drupal.

    i have made it to this tutorial:
    http://www.youtube.com/watch?v=2N3B9pETTaE&noredirect=1

    and have come to an impasse.

    whatever i do the content i select will not become a responsive grid. i believe this to be due to not having the correct class attribute.

    problem with views-view.tpl.php and views-view-fields.tpl.php and 1 more question!

    Hi,
    I have a marquee in my page and also a views-view.tpl.php and this is its content :

    <?php
    print $rows;
    ?>

    in this way marquee works right but when I change it to

    print $content;

    marquee wont work and nothing will be displayed!
    and when I rename this file to views-view-fields.tpl.php no matter what its source code is, it wont work.

    and please tell me what is the exact difference between these two files?

    I want to access a node's $content as a URL

    I have a page mysite.com/mypage In page.tpl.php there is a variable $content. I would like to access it's executed value as a URL related to the original page's URL, something like mysite.com/mypage.plain.

    I want to do that without having to create a page-node-xx.tpl.php for each page.

    Minimal, Clean Base Theme

    Howdy,

    I know this is a much discussed topic, but I couldn't find any solutions to my exact problem after searching.

    Pages

    Subscribe with RSS Subscribe to RSS - Theme development