Project

General

Profile

Bug #995

Field Groups View as tab

Added by David R over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Target version:
Start date:
October 04, 2013
Due date:
% Done:

100%

Estimated time:

Description

This doesn`t seem to work, when adding additional groups and setting view at tab, it doesn`t happen on front end you just get a list unstyled

History

#1

Updated by Vasily Bezruchkin over 7 years ago

What item do you create a group for?

Please try this for members. It should work fine.

#2

Updated by David R over 7 years ago

Will try, was using Item: Listings and looking at view listings page

#3

Updated by David R over 7 years ago

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost/sub301/packages/directory/templates/common/css/style.css

#4

Updated by David R over 7 years ago

Members: Working
Listings: wrong css path call
Category: Dont understand function, is only visible creating editing category even thyough display on all selected

#5

Updated by Vasily Bezruchkin over 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

Fixed for directory. CSS reference removed.

#6

Updated by Vasily Bezruchkin over 7 years ago

Category: Dont understand function, is only visible creating editing category even thyough display on all selected

No way to setup that. This is only necessary for the items with real content like listings, members, autos, real estate, etc.
#7

Updated by Vasily Bezruchkin over 7 years ago

  • Project changed from Subrion Opensource CMS to Web Directory
  • Category deleted (Core)
  • Assignee set to Vasily Bezruchkin
  • Target version set to 3.0.1

Solution:
open directory/manage.php

find this code:

    $itemInfo = array();
    $sections = iaField::getFieldsSection(false, 'listings', $where, $itemInfo);

    $iaView->assign('root_cat', $rootCategory);
    $iaView->assign('listing', $listing);
    $iaView->assign('category', $category);
    $iaView->assign('sections', $sections);

change to this:
    // get fieldgroups
    list($tabs, $fieldgroups) = iaField::generateTabs(iaField::filterFieldsByGroup($item, $iaListing->getItemName()));

    // compose tabs
    $sections = array_merge(array('common' => $fieldgroups), $tabs);
    $iaView->assign('sections', $sections);

    $iaView->assign('root_cat', $rootCategory);
    $iaView->assign('listing', $listing);
    $iaView->assign('category', $category);

open directory/view.php
find this code:

    $sections = array(
        'general_info' => iaField::filterFieldsByGroup($listing, $iaListings->getItemName(), array('where' => "`f`.`type` NOT IN ('pictures', 'image') AND `f`.`name` NOT IN ('title')")),
        'pictures_info' => iaField::filterFieldsByGroup($listing, $iaListings->getItemName(), array('where' => "`f`.`type` IN ('pictures', 'image')", 'not_empty' => true))
    );

change to this:

    // get fieldgroups
    list($tabs, $fieldgroups) = iaField::generateTabs(iaField::filterFieldsByGroup($item, $iaListing->getItemName()));

    // compose tabs
    $sections = array_merge(array('common' => $fieldgroups), $tabs);

This should work!

#8

Updated by David R over 7 years ago

Tried 3 times white screen on view listings

#9

Updated by Vasily Bezruchkin over 7 years ago

Please PM me your FTP through the forums. Thanks!

Also available in: Atom PDF