Fork me on GitHub

Custom layout for content module creates menu issue  Bottom

  • http://new.peopleschurchvancouver.org big gap above the menu all of a sudden. BUT it disapears when clicking on the Ministries page, and it's not there for any of it's sub pages. There's no template over-rides, and there's no space in the div. Any idea where that space could be coming from? It wasn't there before, and I've removed all changes I made today.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • I'd save the source of Ministry and another page from your browser and open them up in WinMerge for a comparison. Easy to miss little things.
  • Okay, after disabling, and enabling everything on the Menutree Menu, I narrowed it down to something with the Ministry menu item.

    I went in to Content, disabled all the sub pages, still there. Changed the layout for the page, it went away, so it's something in my layoutapi I presume that is causing the problem, since I don't see the page template being a factor in the menu generation.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Here's my custom layoutapi. I'm rusty on my PHP so I don't know if I can track down what in here is giving the problem, because i'm not 100% what in here is giving the info to Menutree.

    Code

    <?php
    /**
     * Content 2 column layout plugin
     *
     * @copyright (C) 2007-2010, Content Development Team
     * @link http://code.zikula.org/content
     * @version $Id: column2header.php 371 2010-01-05 16:15:52Z herr.vorragend $
     * @license See license.txt
     */


    class content_layouttypesapi_intropagePlugin extends contentLayoutBase
    {
        var $contentAreaTitles = array();

        function __construct()
        {
            $dom = ZLanguage::getModuleDomain('content');
            $this->contentAreaTitles = array(__('Left Column', $dom), __('Header', $dom), __('Main Column', $dom));
        }
       
        function content_layouttypesapi_intropagePlugin()
        {
            $this->__construct();
        }

        function getName()
        {
            return 'intropage';
        }

        function getTitle()
        {
            $dom = ZLanguage::getModuleDomain('content');
            return __('Topic Intro Page', $dom);
        }

        function getDescription()
        {
            $dom = ZLanguage::getModuleDomain('content');
            return __('2 Columns + Header', $dom);
        }

        function getNumberOfContentAreas()
        {
            return 3;
        }

        function getContentAreaTitle($areaIndex)
        {
            $dom = ZLanguage::getModuleDomain('content');
            return __('MainColumn', $dom);
        }
    }

    function content_layouttypesapi_intropage($args)
    {
        return new content_layouttypesapi_intropagePlugin();
    }


    --
    Home Page | Find on Facebook | Follow on Twitter
  • I've switched to an alternate template for now, until I can track down the problem. Sadly not much in the way of documentation on creating layouts and content plugins to help me troubleshoot what May be wrong. It's easy to figure out in general, but don't know if this is a Content or Menutree issue.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • I had a different problem with content, but equally strange. Mine appeared as soon as the document ID exceeded a certain value (six or eight, I think). Just curious: Do the problems appear if you preview the documents in question? Here preview was fine, but the real view caused trouble.

    Mysterious problem - I "solved" it by combining content into fewer documents and modifying the document IDs directly in the database to lower values.

    --
    And out of the chaos sounded a voice and spoke: "Be happy and smile, for it could have come worse."
    And I was happy and smiled - and it came worse...
  • The problem isn't in the display of the page, it's in how the content plugin for menutree is reading the layoutapi. It's only that one layout that creates the problem, if I switch to a different layout it goes away. I'm just not sure if it's something I did wrong in the definition of the layout, or a fault in menutree's plugin, I don't know enough about either to track it.

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Hi, you should try Firebug as well for the wrong layout. Try clicking on the empty space and Inspect the styling of that part. (I'm using safari that provides sort of the same features for browsing the page CSS styling). What layout is not working and what is? And with the layout not working do you mean the menutree menus? You now have the cssplay prodrop activated, is that working for you? In my safari it looks ok.

    If you have both online it should be not that hard to see what is wrong, but maybe I'm looking at it too simple icon_smile I have made a custum Content layout as well (to make use of native BlankTheme columns instead of the Content ones), so I know a little.



    edited by: espaan, datetimebrief

    --
    campertoday.nl, Module development, Dutch Zikula Community
  • Yeah, I'm doing the same thing, creating them built on my 960 framework themes. They look fine now because I switched to a more complex, but similar layout, The one I'm having a problem with is a simple one, full width header, Menu Column and Main column The replacement one has the same header and menu column, but in addition to the full width main, there 2 50% columns under that. The more complex one works fine, the simple one is the one I'm having problems with.

    The problem seems to be that with that one layout, a blank line is being inserted above the menutree code in the navbar div.

    If you want to see the problem in action, I'm on Skype, give me a shout and I'll flip the switch to make it hapen again.



    edited by: HalbrookTech, datetimebrief

    --
    Home Page | Find on Facebook | Follow on Twitter
  • Then it'll be tonight icon_smile No Skype here at work any more. It's not the 50% that is causing it, as in maybe you should make it 49% or something like that?

    --
    campertoday.nl, Module development, Dutch Zikula Community

This list is based on users active over the last 60 minutes.