accordian no link and no target page option

1-The accordian display option doesn't have links to open the categories.

2-An option to open a link to a site in a separate window seems necessary.

  • Paul
    • The Green Incsub

    @sharonmiranda, and (@Ashok)

    1-The accordian display option doesn't have links to open the categories.

    Not sure I follow. There generally is not a link on an accordion layout for the parent items. Consider this test site http://media-tags.com/blog-listing/ you click on the head area 'Vacations' and the top section, 'Schools' collapses and the clicked section expands. Here is a video http://screencast.com/t/w9IJjPpA9ee This is why on the Site Categories settings there is a specific option to prevent the parents from being selectable.

    2-An option to open a link to a site in a separate window seems necessary.

    No of course you do not see an option for opening in a new window. This is really non-standard. The site category links are linking to pages within the current site. You would not for example have a category archive where the posts are linked such that they open in a new window.

  • Paul
    • The Green Incsub

    And if you really want to add link targets to these Site Categories then you can add this to your theme with some easy JS/jQuery

    http://stackoverflow.com/questions/804256/how-do-i-add-target-blank-to-a-link-within-a-specified-div

    All the Site Category content is contained within a wrapper within the page content. So again consider this example landing page http://media-tags.com/blog-listing/ you will see the content is contained within

    <div id="site-categories-wrapper">

    For any of the widgets you can target the unordered list element

      with a class 'site-categories-widget'

      <ul class="site-categories site-categories-widget">

    • Ash
      • WordPress Hacker

      @sharonmiranda you can add the following code in footer.php to open the link in a new window:

      <script type="text/javascript">
      jQuery(function($) {
          $('#site-categories-wrapper a').each(function() {
              $(this).attr('target', '_blank');
          });
      });
      </script>

      Cheers
      Ash

    • Paul
      • The Green Incsub

      @Ashok,

      Yeah, we had tried that before. The problem is the way jQuery sets up the click event on the header div element. Having another click event trappable inside the div causes issue when you just want the header to expand. At least this was what we say about a year ago.

      I'll see what I can come up with for a solution.

    • Ash
      • WordPress Hacker

      Hi @Paul

      Yes, you are right. Just one more idea came up in my head, not sure if it could be useful.

      When accordion is used, how's about adding an extra link at the top of child categories list, like "View sites from parent categories" or something?

      E.g.:

      1. View sites from parent categories
      2. Child cat 1
      3. Child cat 2
      and so on...

      Cheers
      Ash

    • sharonmiranda
      • Design Lord, Child of Thor

      "No of course you do not see an option for opening in a new window. This is really non-standard. The site category links are linking to pages within the current site. "

      BUT.....

      This plugin functions for a whole network, which includes more than the current site. So the links are NOT linking to withing the current site.

      So, if a person clicks into another site, there is no clear way to return to the site category page. That's all that's really needed. A simple link back to original page.

    • sharonmiranda
      • Design Lord, Child of Thor

      On the accordion issue, what I meant to say was, there is no link to open the post. Nothing is clickable. Perhaps I have a conflicting plugin. Are you aware of any that might conflict?

      And, on the link target issue, besides needing a way back to the original "Site Categories" pages from an actual post in some other site in the network, a way to go up one level while drilling down is also needed. I see you and Ashok discussing possibilities. How about a simple breadcrumb?

      I started looking for a network wide breadcrumb plugin to resolve both scenarios, but no luck.

    • Paul
      • The Green Incsub

      @sharonmiranda,

      On the accordion issue, what I meant to say was, there is no link to open the post. Nothing is clickable. Perhaps I have a conflicting plugin. Are you aware of any that might conflict?

      Open the post? There are no posts involved here only categories for the sites/blogs within your Multisite system. Per the discussion in this thread with Ash I'll be adding a link offset to the right within the expanded accordion section. See image please. Also note on the screen image the count showing within the header is the total of all children. While the internal right offset link count is just the number per the parent. If the parent does not have any direct items ten the right offset link is not shown.

      Aware of conflict? not really. Then again there is no real way for us to test with the multitude of other plugins out there. Best option is for you to try disabling other plugins one by one and see if the issue resolves itself.

      And, on the link target issue, besides needing a way back to the original "Site Categories" pages from an actual post in some other site in the network, a way to go up one level while drilling down is also needed. I see you and Ashok discussing possibilities. How about a simple breadcrumb?

      Not fully sure I follow you. The only place we would be able to add any breadcrumb is on the site categories landing page. The way this would work is when you first view the main landing page you would not see a breadcrumb (return link).

      If the user selects a category then the page reloads and you are shown the sites/blogs within that category as well as a return link to go back to the main site categories landing page listing.

      If the user clicks on a sites within this second listing and is taken to a site there is not possible way to provide a back link to return to the site categories landing page as the site categories output only runs on the landing page not each site.

      Note this will be a return link not a true breadcrumb. This will be an option the admin can show or hide.

      Also, per your request I'll be adding the option to force the links to open in new tab/window. This will be on all links both for the main landing page as well as the second category specific listing.

    • Paul
      • The Green Incsub

      @sharonmiranda

      Though it sure would be nice if someone developed a network-wide breadcrumb plugin.

      I think some have tried ( http://wordpress.org/plugins/tags/breadcrumb )

      The problem is going to be two issues.

      1. Having breadcrumbs work the same across all the theme variations will be a total pain.

      2. For Site Categories there might be other issues since the second page is virtual. Actually you can turn off pretty permalinks with the plugin settings. In that case a breabcrumb plugin would not be able to properly know you are on the second page vs the first page of the landing. So best I can offer is showing a return link with a customizable label.

    • Paul
      • The Green Incsub

      @sharonmiranda, @Ashok,

      https://dl.dropboxusercontent.com/u/2616987/WPMUDev/site-categories/beta/site-categories-1.0.9-Beta1.zip

      Ok. I think I'm finally done with all the changes. Should now see the accordion links per my previous image. Also added lots more output options including nested UL/OL for both the parent and child as well as mix and match. For example I can see the parents to display as accordion then the child (inner) items to display as a select, nested UL/OL or flat UL/OL.

      Added options for the return link on the Sites listing. As well as open blank (new window ) on Sites listing and all thread widgets.

      Please give it a test and let me know. Thanks.

    Thank NAME, for their help.

    Let NAME know exactly why they deserved these points.

    Gift a custom amount of points.