0

I have created a custom theme for my website. Now, I've started getting some strange problems.

After installing Profile2 module, I am not getting view & edit option but it work fine if I use Bartik theme.

Another problem is that if an authenticated user logs in, his defalut home page changed to 'user/18' & couldn't able to access front page (as defined in page--front.tpl.php). But this works fine in case of Bartick.

I don't know what did I miss in my new custom theme. Any suggestions?

screenshot

1
  • 1
    How did you create the custom theme? What instructions were you following? Are you using a base theme? Commented Aug 3, 2013 at 4:25

1 Answer 1

0

You must have forget to render $tabs variable in your custom theme. You have to render it before you render your $content in page.tpl.php

Example from my page.tpl.php --

<?php if ($page['content']): ?>
    <div class="content">
        <?php if ($tabs): ?>
            <div class="tabs">
                <?php print render($tabs); ?>
            </div><!--tab end-->
        <?php endif; ?>
        <?php if ($title) : ?>
            <h1 class="title">
                <?php print $title; ?>
            </h1>
        <?php endif; ?>
        <?php print render($page['content']); ?>
    </div><!--content end-->
<?php endif; ?>

Structure your page.tpl.php like this by rendering $tabs variable before title, clear the cache & you will have tabs..

2
  • Rajeev, it's a perfect answer. It solved my tabs issue. but the issue with home page still remains. After loged in my home page is redirecting to 'sitename/user/18' instead of 'sitename' . I have specified my home page in page--front.tpl.php Commented Aug 6, 2013 at 8:29
  • @SureshAlagar See your Site Information in configuration section. You must have set this as front page from there if you are not using loginredirect. Otherwise you can control it by using login redirect module. This should be another question, it's totally different issue...
    – RajeevK
    Commented Aug 6, 2013 at 12:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.