Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • zdmdesignz Friend
    #197605

    Hello,

    How do I hide the parent category from appearing in the portfolio?

    I would only like to have each child category display in the top navigation, and not the parent category.

    Portfolio Category hierarchy:

    Portfolio (parent)

    Print (child of Portfolio)
    Web (child of Portfolio)
    Print (child of Portfolio)
    Other (child of Portfolio)

    The reason for this because after setting all the grid sizes for the child categories, the “ALL” category view really messes up the presentation. Once the “ALL” category tries to combine the child categories together, they look horrible with empty grid spots etc.. Essentially I can manually set the grid sizes for each child category and there are no spaces or empty grids I can make some 2×2 and some 1×1 and order them to look great, but once combined, it screws up everything.

    Thanks in advance.

    Best,
    Zechariah

    MoonSailor Friend
    #534559

    @zdmdesignz : You need to change this code.
    In the file “templates/ja_sugite/html/com_content/mod_articles_categories/portfolio.php”, find and remove code below:


    <li <?php if ($_SERVER['PHP_SELF'] == JRoute::_(ContentHelperRoute::getCategoryRoute($params->get('parent', 'root')))) echo ' class="active"';?>>
    <a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($params->get('parent', 'root'))); ?>">
    <?php echo JText::_('TPL_ARTICLES_CATEGORIES_ALL');?>
    </a>
    </li>

    zdmdesignz Friend
    #535232

    Thank you very Kindly 🙂

    zdmdesignz Friend
    #535357

    Hello MoonSailor,

    This is probably my fault because I didn’t articulate it in my previous message, but I need to not only hide the “All” category, but also have the Porfolio view default to the next category (in this case, “Print). Although the “ALL” category is not visible in the portfolio navigation, the portfolio display is still defaulting to “ALL” category.

    http://www.zmdesignsbranding.com/portfolio

    Thanks 🙂

    Zechariah

    MoonSailor Friend
    #535369

    @zdmdesignz It’s a bug of Joomla. In the case, open the file “/templates/ja_sugite/html/mod_articles_categories/portfolio_items.php”, find code:


    <li <?php if ($_SERVER['PHP_SELF'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"';?>> <?php $levelup=$item->level-$startLevel -1; ?>

    then replace it with:


    <li <?php if ($_SERVER['PHP_SELF'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)) || $_SERVER['REQUEST_URI'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))) echo ' class="active"';?>> <?php $levelup=$item->level-$startLevel -1; ?>

    zdmdesignz Friend
    #535385

    Thank you for your help MoonSailor.

    I apologize, but after making the php changes, I’m not seeing any difference. The Portfolio page is still defaulting to “ALL.” You can tell by clicking “MORE EXAMPLES,” which then begins to load examples from the “LOGO” category.

    Also, the current active category will have a red border around it. As you can see, when you load the Portfolio page, there is no active category displaying in the portfolio navigation.

    What I really need is for the first child category according to the category manager to be the default active category for the Portfolio page. In this case, it would be “Print.”

    Hope this helps.

    Thank you again in advance for your time and help in this matter 🙂

    Best,
    Zechariah

    MoonSailor Friend
    #535651

    @zdmdesignz: In this case, please replace the code of file “/templates/ja_sugite/html/mod_articles_categories/portfolio_items.php” with:


    <?php
    /**
    * $JA#COPYRIGHT$
    */

    // no direct access
    defined('_JEXEC') or die;
    $i = 0;
    foreach ($list as $item) :

    ?>
    <li <?php if ($_SERVER['PHP_SELF'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)) || $_SERVER['REQUEST_URI'] == JRoute::_(ContentHelperRoute::getCategoryRoute($item->id))){echo ' class="active"';}else if($i==0){echo ' class="active"';} ?>> <?php $levelup=$item->level-$startLevel -1; ?>
    <a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id)); ?>">
    <?php echo $item->title;?>
    </a>

    <?php
    if($params->get('show_description', 0))
    {
    echo JHtml::_('content.prepare', $item->description, $item->getParams(), 'mod_articles_categories.content');
    }
    if($params->get('show_children', 0) && (($params->get('maxlevel', 0) == 0) || ($params->get('maxlevel') >= ($item->level - $startLevel))) && count($item->getChildren()))
    {

    echo '<ul>';
    $temp = $list;
    $list = $item->getChildren();
    require JModuleHelper::getLayoutPath('mod_articles_categories', $params->get('layout', 'default').'_items');
    $list = $temp;
    echo '</ul>';
    }
    ?>
    </li>
    <?php
    $i++;
    endforeach; ?>

    Then let me know how it goes.

    zdmdesignz Friend
    #535756

    Hello MoonSailor,

    Thank you again for your help. This solution is almost there (one step closer it would initially seem).

    The active border now shows on the PRINT category when you click on the Portfolio link in the navbar, but unfortunately when you click “More Examples,” it loads examples from the LOGO category as well as the rest of the child categories.

    It also always keeps the PRINT category selected in the portfolio navigation, even when you click on another category such as LOGO, WEB and OTHER, meaning it shows more than one active category (and more than one border around a category) 🙁

    Please see PM regarding this post.

    Best,
    Zechariah


    1. portfolio-screenshot
    zdmdesignz Friend
    #536327

    If MoonSailor is too busy at the moment, perhaps someone else can look into this 🙂

    zdmdesignz Friend
    #536879

    Hello,

    I really appreciate all the help on this forum. Support has always been great. Thank you so much 🙂

    For this particular issue, the default portfolio setup has made it very difficult to properly display portfolio items when combined together from all categories.

    The necessity to manually arrange grid sizes within each singular category without blank spaces is already a bit of a challenge. When then adding an additional variable of making sure those grid sizes then flow correctly when combining the categories is near impossible, especially when taking in to consideration that a portfolio is constantly changing with new examples being added continually.

    Blank spaces are very unprofessional looking and make it appear as though an example is missing or that the site has an error. This is a killer when potential clients are looking through my site and deciding whether they want to do business with me.

    This very important issue has caused me the need to find a remedy, which is to remove the Parent “ALL” (Portfolio) category from view, and instead default to the first child category, in this case “PRINT.” This ensures that the grid sizes I’ve manually configured for each category appear correctly and professionally.

    I really feel that this functionality and backend configuration option would be an important update to this template for the future. The ability to not display a “catch-all” category view is really quite essential for a professional presentation and seamless user experience in this case.

    This thread was started on 5/11, and I’ve PMed MoonSailor as of 5/19, but it’s possible that he’s busy and unable to attend to this issue. If anyone else is able to help me out on this, I would be greatly appreciative.

    I’m very sorry to be a bother. Again, your support is amazing, and I have no complaints regarding your dedication to your customers.

    I assure you that I’m not lazy, I’m just unversed in how to make this happen via PHP.

    Best,
    Zechariah

    Ninja Lead Moderator
    #537044

    Hi Zechariah,

    My apologies for this late response, somehow we missed this thread.

    I have checked and am afraid that your request exceeds the scope of our service. It needs heavy customization which is beyond scope of JA support. Hope for your understanding on this.

    zdmdesignz Friend
    #537278

    Thank you for your response.

    Solution:

    1. Create Portfolio Menu item in a hidden Master Menu (not assigned to any module). This will publish the portfolio in general and get it ready for access in the next step.

    2. Create an External URL menu item in the top mainmenu. Relative link to the desired child category inside the parent portfolio category…”/portfolio/print”. See screenshot below.

    I was forced to do it this way because no redirect solution was working (Joomla extensions, htaccess, or host-side).

    Best,
    Zechariah


    1. portfolio-link
Viewing 12 posts - 1 through 12 (of 12 total)

This topic contains 12 replies, has 3 voices, and was last updated by  zdmdesignz 10 years, 5 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum