No Code Attached Yet
avatar N6REJ
N6REJ
4 Jun 2022

Steps to reproduce the issue

Create a custom fields - text field to be used as the repeatable field.
Create a custom fields - subform field and select your repeatable field as the field to use. Set "Render value" to 'yes'
create an accordion article ( see attached file ) leaving one or more of the repeatable fields empty.
repeat putting something in the repeatable field.

Expected result

When something from the repeatable fields exists the subform will show the subform.
image

When there are no repeatable fields it will hide that subform entry.

Actual result

Entry still displays but with no content.
image

System information (as much as possible)

systeminfo-2022-06-04T23_22_15+00_00.txt

Additional comments

The accordion is straight css/html. No JS or other behavior altering code.
Salesview.txt
https://pilkey.abiviahost.ca/classics/1947-chevrolet-3100-pickup#accordion4 ( this is the safety row )
Template: j51_nina - https://joomla51.com/joomla-4-templates/j51-nina-j4

avatar N6REJ N6REJ - open - 4 Jun 2022
avatar joomla-cms-bot joomla-cms-bot - change - 4 Jun 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Jun 2022
avatar brianteeman
brianteeman - comment - 5 Jun 2022

Look at your static html. Of course it does what you say. There is zero code to conditionaly check if an accordion should be shown or not.

				<div>
					<span class="target-fix" id="accordion4"></span>
					<a href="#accordion4" id="open-accordion4" title="open">Safety</a>
					<a href="#accordion" id="close-accordion4" title="close">Safety</a>
					<div class="accordion-content">
						{field 29}
					</div>
				</div>

Your code is doing exactly what you have told it to do. Please use the forum for support.

avatar N6REJ N6REJ - change - 5 Jun 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-06-05 07:02:16
Closed_By N6REJ
avatar N6REJ N6REJ - close - 5 Jun 2022
avatar N6REJ
N6REJ - comment - 5 Jun 2022

I see your point.

avatar brianteeman
brianteeman - comment - 5 Jun 2022

Best you can do simply would be to remove the margin bottom and then at least it wont show th small white area. Best would be to write conditional code

avatar N6REJ
N6REJ - comment - 6 Jun 2022

thanks, I'll look into how to do that, js is not my strong point.

avatar brianteeman
brianteeman - comment - 6 Jun 2022

it would be php not js

put an if not null statement before the slide

avatar N6REJ
N6REJ - comment - 8 Jun 2022

you can't put php ( afaik ) into the template file as tiny wipes it out when you load the template

avatar brianteeman
brianteeman - comment - 8 Jun 2022

ah - did not know it was a content template

Add a Comment

Login with GitHub to post a comment