Post by blackicicle » Thu Feb 02, 2023 12:48 pm

Hi, I'm looking for someone who would modify this for $10 USD for me. I can send funds by paypal.
I want to modify the code to show three categories deep instead of just two.
I am using Category Plus on my others site so I know it's possible, but I don't want to use category plus on this site because of aesthetics.
The code:

Code: Select all

<div class="category-list">
	<div class="box-category">
		<h3 class="toggled relative">{{ heading_title }}</h3>
		<ul class="list-unstyled parent" id="selectMe-desk">
			{% for category in categories %}
				{% if category.children %}
					{% set class = 'has-more-category' %}
				{% else %}
					{% set class = '' %}
				{% endif %}
				<li class="{{ class }}">
					{% if category.children %}
						<a href="{{ category.href }}" class="list-group-item main-item" >{{ category.name }}<span class="toggled"></span></a>
					{% else %}
						<a href="{{ category.href }}" class="list-group-item ">{{ category.name }}<span></span></a>
					{% endif %}
					{% if category.children %}
						<ul class="list-unstyled child-categories group">
							{% for child in category.children %}
								<li >
									{% if child.category_id == child_id %}
										<a href="{{ child.href }}"  class="list-group-item " >&nbsp;&nbsp;&nbsp; {{ child.name }}</a>
									{% else %}
										<a href="{{ child.href }}" class="list-group-item" >&nbsp;&nbsp;&nbsp; {{ child.name }}</a>
									{% endif %}
								</li>
							{% endfor %}
						</ul>
					{% endif %}
				</li>
			{% endfor %}
		</ul>
	</div>
</div>

<script><!--
$(function() {
	$(".parent .fa.fa-plus").remove();
	$(".parent .toggled").append("<i class='fa fa-plus'></i>");
	$('.parent .toggled').click(function(e) {
		e.preventDefault();
		if (!$(this).parent().hasClass('active')) {
			$('+ ul', $('a.list-group-item.main-item')).slideUp();
			$('a.list-group-item.main-item').removeClass('active');
		}
		$(this).parent().toggleClass('active');
		$('+ ul', $(this).parent()).slideToggle('slow');
		return false;
	});
});
--></script>

Newbie

Posts

Joined
Fri May 27, 2022 12:22 am

Post by blackicicle » Thu Feb 02, 2023 12:54 pm

This is what the code does with only two levels deep.
Image

This is what I need with three levels deep.
Image

Newbie

Posts

Joined
Fri May 27, 2022 12:22 am

Post by JAY6390 » Thu Feb 02, 2023 1:08 pm

This should be relatively straight forward for any competent developer, however it's not going to be just the template that will need editing in this instance. I'd be happy to quote properly for this but $10 wouldn't cut it tbh after all the fees and currency conversions

Image


User avatar
Guru Member

Posts

Joined
Wed May 26, 2010 11:47 pm
Location - United Kingdom

User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România
Who is online

Users browsing this forum: alanjones, ianradnor089, paulfeakins and 21 guests