YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar malc asked

Disable links in main categories

I am building a frontpage directory listing based on the Business Directory app and want to disable the main category links.

The reasoning is to have sub-categories listed on the frontpage, which will have active links, leading to a single item for each sub-category. This effectively give a frontpage with main category headings and pseudo-items (sub-categories).

I can't find a setting to disable the main (root) category links, but hopefully a css or php tip can do this.

Malc

  • ZOO

4 Answers

1

Avatar michael.maass Support Online answered

I am building a frontpage directory listing based on the Business Directory app and want to disable the main category links.

To disable the linking of the main categories in a ZOO Business Directory app instance's Frontpage or Category view please carefully follow the steps listed further down.

You should be capable of using FTP, copying and duplicating files, and editing *.xml and *.php files. "Coding skills" are not required. Technically all the files involved are just text files.

  • Create a custom ZOO template for the "Business Directory" app. Best start out by duplicating the ZOO template you currently use for the app instance in question. You did not provide that information, so for the sake of argument I will base my description on the ZOO template "UIkit" with a custom copy named "UIkit Custom".

    The procedure is described for the "Cookbook" app in [Tutorial] Get a custom ZOO app template. The steps to take for the "Business Directory" app are very similar.

    Important:

    If you create a custom ZOO template as described the following changes are update-safe. Do not skip this step. Do not start to modify an original ZOO template. Otherwise your changes will be lost without warning when you apply the next ZOO update.

  • For my example the custom ZOO template resides in the following path:

    media/zoo/applications/business/templates/uikit-custom/

  • Use a text editor capable of UTF-8 encoding to open the file

    media/zoo/applications/business/templates/uikit-custom/_category.php
    (mind the underscore at the beginning of the file name!)

  • Look for this string (line 21 in "UIkit", line 15 in "UIkit 3", line 22 in "Default"):

    <a href="<?php echo $link; ?>" title="<?php echo $category->name; ?>"><?php echo $category->name; ?></a>
    

    and change it to

    <?php echo $category->name; ?>
    
  • Save and close the file.

Reload the page in the frontend and test. Main category names should not be linked anymore.

Thank you

Edited

2

Avatar michael.maass Support Online answered

When asking for assistance of any kind please generally post a link to your site and — where applicable — a page showing the subject of your question. A first hand look at the page could possibly tell us more about several aspects regarding current settings, which style you use, the markup in its context, as well as other details which are probably important when it comes to explanations, instructions or troubleshooting.

Without providing sufficient information you will rarely get a spot-on answer because everybody is left to guessing what might be wrong and how to approach your issue.

If you don't want to openly post the URL or it is set "Offline" (Joomla) or otherwise locked (via .htaccess/.htpasswd for instance) just click Edit at the bottom right of your initial question (= the first post in this thread) and then use Add hidden information at the bottom left to provide the required access data.

Anything in the Hidden Information field will only be visible to the YOOtheme support team.

Once there is a page to inspect I will take a look to see what I can suggest.

Thank you

0

Avatar malc answered

The site is an offline WAMP development test site. But this image shows the frontpage design goal and the backend categories and items.
https://www.dropbox.com/s/s594yzfi0ixxden/local_directory_frontpage_design.jpg?dl=0

An existing website using Mosets tree as a local directory shows what I am trying to improve on using ZOO.
http://www.ashtonkeynes.org.uk/index.php/directory
https://www.dropbox.com/s/t26es0oroqddzpl/local_directory_mosets.jpg?dl=0

It's a fairly simple directory listing of items grouped by categories.

Malc

0

Avatar malc answered

Thanks Michael,

Perfect solution to my request. Excellent support as usual.

Malc

Know someone who can answer? Share a link to this question via email or twitter.