Jump to content

Targetting a category in Downloads for CSS


Recommended Posts

Unfortunately for me, Downloads doesn't appear to allow admins to specify that a category is a container, which is what I would like to have, so that my related sorts of Downloads (Official Documentation, Educational Material etc) are all placed under the same umbrella.

I don't have any intention of uploading to the parent category itself; I just want to treat it as a container which displays a feed of the latest files in its subcategories. The page, unfortunately, has a great big message on it which I don't want to be there. I see this:


People without uploading permissions see this:


I think the solution is going to be to apply

.cDownloadsCategoryTable {display: none;}

in my custom CSS but that will, of course, apply it to all pages indiscriminately. What I need to do is target this particular page. I know that its ID is 17 but I can't see anything to target in the HTML. The body tag is rather generic:

data-pageApp='downloads' data-pageLocation='front' data-pageModule='downloads' data-pageController='browse'

I can see that the only thing carrying a unique identifier for this category is the Follow button. But I'm not sure I could target .cDownloadsCategoryTable based on this because it falls outside of the div selection under the target:

<div class="ipsPageHeader ipsClearfix ipsSpacer_bottom">
	<h1 class="ipsType_pageTitle">Esperanto Association of Britain</h1>
	<div class='ipsPos_right ipsResponsive_noFloat ipsResponsive_hidePhone'>
		<div data-controller='core.front.core.followButton' data-followapp='downloads' data-followarea='category' data-followid='17'> <!-- There's the target! -->
			<span class='ipsType_light ipsType_blendLinks ipsResponsive_hidePhone ipsResponsive_inline'><i class='fa fa-info-circle'></i> <a href='https://suite.esperanto.org.uk/login/' title='Go to the sign in page'>Sign in to follow this</a>&nbsp;&nbsp;</span>
			<div class="ipsFollow ipsPos_middle ipsButton ipsButton_link ipsButton_verySmall ipsButton_disabled" data-role="followButton">
				<span>Followers</span> <span class='ipsCommentCount'>0</span>
	<a class='ipsButton ipsButton_fullWidth ipsButton_light ipsButton_small ipsResponsive_block ipsResponsive_hideDesktop' data-ipsmenu="" href='#elDownloadsCategories_menu' id='elDownloadsCategories'>Sub Category &nbsp;<i class='fa fa-caret-down'></i></a>
	<div class='ipsPageHeader_info ipsType_normal'>
		<p>Downloads from EAB, including its magazines and official documentation</p>
<div data-controller='downloads.front.downloads.browse'>
	<ul class='ipsMenu ipsMenu_auto ipsHide' id='elDownloadsCategories_menu'>
		<li class='ipsMenu_item'>
			<a href='xxx/files/category/9-update/'><span class="ipsMenu_itemCount">81</span>Update</a>
		<li class='ipsMenu_item'>
			<a href='xxx/files/category/10-la-brita-esperantisto/'><span class="ipsMenu_itemCount">4</span>La Brita Esperantisto</a>
		<li class='ipsMenu_item'>
			<a href='xxx/files/category/11-official-documentation/'><span class="ipsMenu_itemCount">19</span>Official Documentation</a>
	<ul class="ipsToolList ipsToolList_horizontal ipsResponsive_hidePhone ipsClearfix ipsSpacer_both"></ul>
	<div class='ipsBox cDownloadsCategoryTable'><!-- Here's the bit I want to hide -->
		<div class='ipsType_center ipsPad'>
			<p class='ipsType_large'>No files in this category yet.</p>
	<ul class="ipsToolList ipsToolList_horizontal ipsResponsive_showPhone ipsResponsive_block ipsClearfix ipsSpacer_top"></ul>

So, two things really:

1) Have I got it right that it's not possible to use a category purely as a container in Downloads? If I'm wrong, where is the setting to do so?

2) How would I target the class .cDownloadsCategoryTable specifically for the Downloads category which has the identity 17?

Link to comment
Share on other sites


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

  • Recently Browsing   0 members

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