Recherches récentes
Pas de recherche récente

Frank Perazelli
Adhésion le 13 mai 2021
·
Dernière activité le 27 oct. 2021
Suivis
0
Abonné
1
Activité totale
16
Votes
4
Abonnements
3
APERÇU DES ACTIVITÉS
BADGES
ARTICLES
PUBLICATIONS
COMMENTAIRES DE LA COMMUNAUTÉ
COMMENTAIRES SUR L’ARTICLE
APERÇU DES ACTIVITÉS
Dernière activité effectuée par Frank Perazelli
Frank Perazelli a ajouté un commentaire,
@Gizem
Here is the relevant code from my JS that produces what you are looking for:
// Limit Article List to display only 3 entries
if (document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li');
var articleCount = articles.length;
var moreLink = $(categories[j]).siblings('.see-all-articles');
var moreArticles = moreLink.text();
if (moreArticles != "") {
articleCount = moreArticles.replace("See all","");
articleCount = +articleCount.replace("articles","");
moreLink.hide();
}
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide();
}
}
// change the heading title
var catHeader = $(categories[j]).parent().find('h3 a');
var catTitle = $(catHeader).text();
var catHref = $(catHeader).attr('href');
$(catHeader).text(catTitle
//+ " (" + articleCount + ")"
);
if (articleCount > 3) {
var newSeeAllText = 'See all ' + articleCount + ' articles';
var newSeeAll = $(categories[j]).append(newSeeAllText);
}
}}
Hope this helps.
Frank on aarpfoundationtaxaide.zendesk.com
Afficher le commentaire · Publication le 14 janv. 2016 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
This code works OK on my HC:
// Limit Article List to display only 3 entries
if (document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li');
var articleCount = articles.length;
var moreLink = $(categories[j]).siblings('.see-all-articles');
var moreArticles = moreLink.text();
if (moreArticles != "") {
articleCount = moreArticles.replace("See all","");
articleCount = +articleCount.replace("articles","");
moreLink.hide();
}
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide();
}
}
// change the heading title
var articleCount = " (" + articleCount + ")";
var catTitle = $(categories[j]).parent().find('h3 a').text();
$(categories[j]).parent().find('h3 a').text(catTitle + articleCount);
}}
Hope this solves your situation.
Afficher le commentaire · Publication le 21 juil. 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
@Geoff - I've compared what is working on our site to the code above. The only difference is this:
// change the heading title
var catHeader = $(categories[j]).parent().find('h3 a');
var catTitle = $(catHeader).text();
var catHref = $(catHeader).attr('href');
$(catHeader).text(catTitle
//+ " (" + articleCount + ")"
);
if (articleCount > 3) {
var newSeeAllText = 'See all ' + articleCount + ' articles';
var newSeeAll = $(categories[j]).append(newSeeAllText);
}
}}
See attached screen shot. If less than 3 articles, the "See all ..." does not appear.
Hope this helps.
Afficher le commentaire · Publication le 24 juin 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
@Erik - You can reduce the height of the Section blocks by adjusting the CSS for .section-tree h3
line-height: 60px;
This will reduce the amount of scrolling to see all your sections...
Afficher le commentaire · Publication le 16 juin 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
No that option does not yet exist. You can only Follow from a Section, each on individually. Sorry...
Afficher le commentaire · Publication le 09 janv. 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
@Jose - No any user can Follow any or all Sections.
Afficher le commentaire · Publication le 09 janv. 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
@Jose - Unfortunately the option currently available is to Follow a Section. As the Admin for my Help Center I follow all Sections so that when an author adds an article I get a notification. If you permit Comments to your articles, you can follow the article comments.
Afficher le commentaire · Publication le 09 janv. 2015 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
We ask our users to Follow the Section. When we post a new article an email is generated to users Following that Section. If we do a major update, we temporarily remove the article by making it a draft item, Update the article and then make our edits, remove the draft checkmark and Update. This is now seen as a new article and out goes an email...
Afficher le commentaire · Publication le 08 janv. 2015 · Frank Perazelli
0
Abonnés
2
Votes
0
Commentaire
Frank Perazelli a ajouté un commentaire,
@Wes - Several months ago we used a modification of your code to display the article count in parens following the Section name. In our code we used a split function which suddenly ceased working on 11/18/14. It was necessary to find a work around since Support could not locate the difficulty. I am listing both versions or our code for reference.
// Limit Article List to display only 3 entries - ORIGINAL CODE
if (document.location.href.indexOf('section') == -1 )
{
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--)
{
var articles = $(categories[j]).find('li');
var articleCount = articles.length;
var moreLink = $(categories[j]).siblings('.see-all-articles');
var moreArticles = moreLink.text();
if (moreArticles != "") {
/* THIS IS WHAT FAILED */
var splitText = moreArticles.split(" ");
articleCount = splitText[2];
/* ------------------------------- */
moreLink.hide();
}
if ( articles.length > 3 )
{ for (var k = 3; k < articles.length; k++ )
{ $(articles[k]).hide(); } }
// change the heading title
var articleCount = " (" + articleCount + ") »";
var catTitle = $(categories[j]).parent().find('h3 a').text();
$(categories[j]).parent().find('h3 a').text(catTitle + articleCount);
} }
// Limit Article List to display only 3 entries - NEW CODE
if (document.location.href.indexOf('section') == -1 ) {
var categories = $('ul.article-list');
for (var j = categories.length - 1; j >= 0; j--) {
var articles = $(categories[j]).find('li');
var articleCount = articles.length;
var moreLink = $(categories[j]).siblings('.see-all-articles');
var moreArticles = moreLink.text();
if (moreArticles != "") {
articleCount = moreArticles.replace("See all","");
articleCount = +articleCount.replace("articles","");
moreLink.hide(); }
if ( articles.length > 3 ) {
for (var k = 3; k < articles.length; k++ ) {
$(articles[k]).hide(); } }
// change the heading title
var articleCount = " (" + articleCount + ")";
var catTitle = $(categories[j]).parent().find('h3 a').text();
$(categories[j]).parent().find('h3 a').text(catTitle + articleCount);
}}
Support suggested we post this for others reference.
Frank
Afficher le commentaire · Publication le 24 nov. 2014 · Frank Perazelli
0
Abonnés
0
Votes
0
Commentaire