Jump to content

Show all categories and it's articles in navigation (Pages)


inkredible

Recommended Posts

  • 1 month later...
Posted

I have a question, did I something wrong?

I noticed that by a page refresh all items are expand. 
So that not only items are expand which currently viewed.

Could this be fixed or is this an issue provided by myself? 

59ebbc102a178_Bildschirmfoto2017-10-21um23_26_53.thumb.png.4fe011a7f348737be6934d570703d584.png

  • 1 month later...
Posted
14 hours ago, Koper74 said:

Records in side menu are sorted by _title - I'd like to sort them by an custom field (named "order") but I just don't get it. Any ideas?

devdocs10.jpg.540c1f5110bf552bda57e21602

Sort by setting. Do you see your field there?

Posted
8 hours ago, newbie LAC said:

Do you see your field there?

Unfortunately not. I only have the following choice in the block settings:

2017_12.15_02.thumb.png.b5597f368778d356e734de624983f7e1.png

They do not seem to match the database.


I can only select my custom fields in the database settings, but that does not change the order of the entries in the side menu.
2017_12.15_03.thumb.png.8cea3f78f0ffc2c4b2319b60785de077.png

  • 9 months later...
Posted

Since updating to 4.3.6., it unfortunately does not work any more. Categories are completely displayed, but only 5 from a total of 115 articles are displayed in the sidebar. I cannot see any kind of pattern. 

The HTML structure of the templates and the JavaScript still correspond to the Developer Documantation here on the board (which should probably also run on 4.3.6!?).

Did you make any changes to the DB structure of pages that require changes to be made in the plugin block?

Does anyone else have this problem, or does anyone have a suggestion for me?

Posted
53 minutes ago, Koper74 said:

Since updating to 4.3.6., it unfortunately does not work any more. Categories are completely displayed, but only 5 from a total of 115 articles are displayed in the sidebar. I cannot see any kind of pattern. 

The HTML structure of the templates and the JavaScript still correspond to the Developer Documantation here on the board (which should probably also run on 4.3.6!?).

Did you make any changes to the DB structure of pages that require changes to be made in the plugin block?

Does anyone else have this problem, or does anyone have a suggestion for me?

Can you not set how many records to show when creating block ?

Posted
1 hour ago, steve00 said:

Can you not set how many records to show when creating block ?

That's it. Thx! 👍

Strange - till 4.3.5. it worked with "Number to show = 0"...

  • 1 year later...
Posted

Small addition from me

1. Create new JS, guidesMenu.js, paste below code into and link under the guides page.

/**
 * IPS Social Suite 4
 * (c) 2013 Invision Power Services - http://www.invisionpower.com
 *
 * ips.guides.js - Guides JS controller
 *
 * Author: Rikki Tissier
 */
;( function($, _, undefined){
	"use strict";

	ips.controller.register('guides.menu', {

		initialize: function () {
			this.setup();
		},

		setup: function () {
			// Find the items we need
			var self = this;
			var items = this.scope.find("[data-role='title']");
			var output = [];
			var last = '';

			if( !items.length ){
				return;
			}

			output.push('<ul class="sGuidesMenu__list">');

			items.each( function () {
				var anchor = $( this ).prev('a').attr('id');
				output.push('<li class="sGuidesMenu__item sGuidesMenu__item--' + this.tagName + '"><a href="#' + anchor + '">' + $( this ).text() + '</a></li>');
			});

			output.push('</ul>');

			// Build the menu element
			var menu = "<nav class='sGuidesMenu'><h2 class='ipsType_reset'>In This Guide:</h2>" + output.join('') + "</nav>";

			this.scope.prepend( menu );
		}
	});
}(jQuery, _));

 

2. Go to listing templates and open record template, find

<section class="ipsType_richText ipsType_normal" data-controller='core.front.core.lightboxedImages'>{$record->_content|raw}</section>

replace with

<section class="ipsType_richText ipsType_normal" data-controller='core.front.core.lightboxedImages,guides.menu'>{$record->_content|raw}</section>

3. Add extra CSS to page style file

.sGuidesMenu {
  float: right;
  background: #f5f5f5;
  padding: 25px;
  margin-left: 20px;
  margin-bottom: 20px;
  font-size: 14px;
  width: 230px;
}

/* PHONES */
@media screen and (max-width: 767px) {
  .sGuidesMenu {
   	float: none;
    width: 100%;
    margin-left: 0;
  }
}
	
	.sGuidesMenu a {
        text-decoration: none !important;
	}

	.sGuidesMenu h2 {
      font-size: 16px;
      font-weight: 500;
      margin-bottom: 15px;
      color: #000;
	}

.sGuidesMenu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sGuidesMenu__item {
  padding: 0;
}

.sGuidesMenu__item--H2 {
  font-size: 15px;
}
.sGuidesMenu__item--H2:before {
  content: '\f105';
  font-family: 'FontAwesome';
  margin-right: 5px;
}

.sGuidesMenu__item--H3 {
  font-size: 13px;
  padding-left: 25px;
}

.sGuidesMenu__item--H3 + .sGuidesMenu__item--H2 {
	margin-top: 10px;
}

.sGuidesMenu__item--H4 {
  font-size: 13px;
  padding-left: 40px;
}

.sGuidesMenu__item--H4 + .sGuidesMenu__item--H3,
.sGuidesMenu__item--H4 + .sGuidesMenu__item--H2 {
	margin-top: 10px;
}


4. Go to edit editor Toolbars, add new button of following config, then add the button to the toolbar of your edit. Each time you will create heading with the button it will make heading included in the guide menu.
image.png.d39c01898d8b4b10b65149fd37a73133.png

 

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...