Recent searches


No recent searches

Nikolay Petrov's Avatar

Nikolay Petrov

Joined Apr 16, 2021

·

Last activity Feb 01, 2022

Following

0

Followers

0

Total activity

5

Votes

0

Subscription

1

ACTIVITY OVERVIEW

Latest activity by Nikolay Petrov

Nikolay Petrov commented,

Community comment Discussion - Tips and best practices from the community

No worries Brett, I brushed a bit on JS and was able to pretty much solve this. Thank you for the suggestions.

Have a great day,

Nick.

View comment · Posted Mar 19, 2019 · Nikolay Petrov

0

Followers

0

Votes

0

Comments


Nikolay Petrov commented,

Community comment Discussion - Tips and best practices from the community

Hey @Dan, 

I was actually able to resolve this by updating the css display:none, to block in the following element >

.section-tree-with-article article.article-body {display: none; padding-left: 25px; color: #337ab7;}
.section-tree-with-article article.article-body {display: block; padding-left: 25px; color: #337ab7;}

Now that this is done, does anyone know a way (maybe html or js) on:

1. How to set a trigger for example: if there is an article that contains the word "ongoing" in the title the parent section to auto expand (meaning changing the display:none to block for that section ?

2. How to implement if a section is empty, a text to be displayed under the parent empty Section? For example if Email Hosting section is empty (there are no articles) display - All services are operational.

Cheers,

View comment · Posted Mar 12, 2019 · Nikolay Petrov

0

Followers

0

Votes

0

Comments


Nikolay Petrov commented,

Community comment Discussion - Tips and best practices from the community

Thank you Nicole and Hello Dan, thank you for your time.

Currently I got the accordion to auto expand and to list all sections in there on page load. 

Sections: Announcement, Account Management.. etc

My goal, ultimately it would be to have the sections that contain articles to auto expand on page load similar to the whole accordion and to look like this:

note: the other sections (Domain, Email and VPS are currently empty)

If possible, as addition if the section is empty, maybe instead of empty space, to show an alternative text something like: "All services operational", but that's another idea I will be dealing off. 

JS currently in use:

$(document).ready(function(){

$('.section-tree-with-article .section h2').click(function(e){
e.preventDefault();
$(this).next('.article-list').slideToggle(250);
});

$('.section-tree-with-article .article-list a').click(function(e){
$(this).next('.article-body').slideToggle(250);
});

var link = $('.section-tree-with-article ul > li > a, .category-tree-with-article ul > li > a');
link.click(function(e){
e.stopPropagation();
window.location.href = $(this).attr('href');
});

});

I understand, that this theme may be becoming a relic, but we have based 4-5 help centers on it and with each we have done some sort of customization that someday we will have to deal with if switching to Copenhagen.

Thank you once again for the time and hopefully I was able to explain it a bit better :) Unfortunately, the whole Help Center is still not made public.

View comment · Posted Mar 11, 2019 · Nikolay Petrov

0

Followers

0

Votes

0

Comments


Nikolay Petrov commented,

Community comment Discussion - Tips and best practices from the community

Hey there folks, this is my first comment ever here and before diving in to it, I just want to say big thanks to everyone here that has provided amazing tutorials and help guides! You guys rock!

 

A bit of background prior my question. 

- I am using an old custom theme (it was the one with the octopus).

- I am trying to build something like a status page (which is a category page) that has several sections and an article in those sections would be a status post/incident. 

- I am using {{is}} and {{else}} in category_page.hbs to display particular html just for that one category (status page)

- I am trying to implement the accordion element in this page to have each section in its own accordion and to auto expand if section has articles inside.

Either way I somehow managed to almost accomplish what I need with {{section_tree_with_article}}, but still I was wondering if you guys can help with the following:

 

1. Is it possible to have the section in the accordion to auto expand if there are present articles in there? 

2. If 1. is possible, is it possible to set a label (a word from the article title) to expand the sections containing that tag/label 

For example if you have 2 articles in several sections with the word ONGOING in the title, these sections to auto expand? 

 

Currently I have this:

 




{{#isnt category.name ''}}





{{section_tree_with_article}}



{{/isnt}}


 

Thank you for the time and let me know if you need more info from me like the css/js and etc

Cheers, Nick

View comment · Posted Mar 11, 2019 · Nikolay Petrov

0

Followers

0

Votes

0

Comments