Cannot disable 'Popular this week'

296 views
Skip to first unread message

John La

unread,
Feb 13, 2014, 5:10:45 PM2/13/14
to ica-ato...@googlegroups.com
Hi,
We are on 2.0.1 and before going live, our users wants to get rid of the 'Popular this week' section.
I search documentation and this forum but found nothing.
Is it possible to at least hide it?
 
Thanks,
John

Dan Gillean

unread,
Feb 13, 2014, 5:56:11 PM2/13/14
to ica-ato...@googlegroups.com
Hi John,

The simplest way to do this would be to comment out the line that pulls in the widget - here is the line:

https://github.com/artefactual/atom/blob/2.x/apps/qubit/modules/staticpage/templates/homeSuccess.php#L25

In essence, replace:
<?php echo get_component('default', 'popular', array('limit' => 10, 'sf_cache_key' => $sf_user->getCulture())) ?>

With

<?php // echo get_component('default', 'popular', array('limit' => 10, 'sf_cache_key' => $sf_user->getCulture())) ?>


You could also choose to use CSS to hide the widget - it has its own ID - fittingly named #popular-this-week.
This is not our recommended solution, but it could be done by adding a rule to one of the CSS files here:

https://github.com/artefactual/atom/tree/2.x/plugins/arDominionPlugin/css/less

like so:

#popular-this-week {
display: none;
}


It shouldn't matter which CSS file - the popular this week widget has a unique ID, so adding a custom rule shouldn't affect any other element - but I would probably add it to scaffolding.less. Note that I am NOT a developer, though.

Note that using CSS in this manner could affect page ranking in Google, as Google apparently lowers rank results for any page that uses CSS to hide elements, as it thinks you are trying to cheat and hide keywords or links to boost the site's ranking. The better solution is simply to comment out the widget.

Hope that helps.

Regards,



Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


--
You received this message because you are subscribed to the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/141a0682-8ce6-4d4f-9b72-4facad709a86%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

John La

unread,
Feb 13, 2014, 6:45:51 PM2/13/14
to ica-ato...@googlegroups.com
Thanks Dan,
I just commented out the line and it worked great.
 
Thanks,
John

Ryan Alons

unread,
Apr 23, 2015, 10:46:55 AM4/23/15
to ica-ato...@googlegroups.com
Hi Dan,

I commented out the widget but the "Popular This Week" section remains active on the site even after I refresh the page. Is there a step I'm missing?

Thx,

Ryan

Dan Gillean

unread,
Apr 23, 2015, 12:35:33 PM4/23/15
to ica-ato...@googlegroups.com
Hi Ryan,

The first thing I'd recommend trying is clearing both the application cache, and your browser cache.

Clear the application cache - from the root directory of your AtoM installation, enter the following into the command-line interface:
  • php symfony cc

I'd also suggest clearing your browser cache afterwards.

Let us know if that helps!


Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

Ryan Alons

unread,
Apr 23, 2015, 5:15:21 PM4/23/15
to ica-ato...@googlegroups.com
Hi Dan,

I managed to clear the application cache and my browser cache. Unfortunately the "Popular this week" is still showing. I even looked into the CSS option - I haven't found the #popular-this-week ids in any of the .less files I opened.

I'm going to run these issues by my professor and see if we can get different results then. That'll be on Tuesday.

Thank you for all your help. If you have any more tips/tricks I can use in the meantime feel free to send them my way.

Ryan

--
You received this message because you are subscribed to a topic in the Google Groups "ICA-AtoM Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ica-atom-users/rfI2Mt01ULk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ica-atom-user...@googlegroups.com.

To post to this group, send email to ica-ato...@googlegroups.com.
Visit this group at http://groups.google.com/group/ica-atom-users.

Jesús García Crespo

unread,
Apr 23, 2015, 7:35:05 PM4/23/15
to ica-ato...@googlegroups.com
Hi Ryan,

Are you using a theme that implements its own homeSuccess template? e.g. arArchivesCanadaPlugin does it, see http://git.io/vfuog. If that's the case, you need to update the template under your theme because that one precedes the templates defined under apps/qubit/modules.

Good luck!


For more options, visit https://groups.google.com/d/optout.



--
Jesús García Crespo,
Software Engineer, Artefactual Systems Inc.
http://www.artefactual.com | +1.604.527.2056

Ryan Alons

unread,
May 1, 2015, 10:02:48 AM5/1/15
to ica-ato...@googlegroups.com
Thanks for your help! I just wanted to let you know that eventually the changes came to the site. Apparently what I needed to do was just 'let it be' for a week or so.

Thanks for everything,

Ryan

Dan Gillean

unread,
May 1, 2015, 12:39:35 PM5/1/15
to ica-ato...@googlegroups.com
Hmmmm, very strange! It sounds to me like *something* had to be cached somewhere, but I'm not sure why clearing the browser and application cache didn't do the trick then. In any case, I'm glad that it worked out - thanks for updating us!

Cheers,

Dan Gillean, MAS, MLIS
AtoM Product Manager / Systems Analyst,
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

Reply all
Reply to author
Forward
0 new messages