Page 1 of 1

faq_body.html edit help needed

Posted: Sun Nov 09, 2008 10:08 am
by Wookie1664
I need help to edit this template to change it from 2 to 4 collumns (or maybe even 5).

I'm making a glossary and I've duplicated faq.php, faq_body.html and I've created a language file for the glossary editable in the admin cp, but I'm kind of stuck with changing the ammount of columns in faq_body.html...and I still want to be able to control how many faq blocks show (currently 4) before the next block shifts to collumn 2.

I think the edit needs to be done in here.

Code: Select all

<div class="panel bg1" id="faqlinks">
	<div class="inner"><span class="corners-top"><span></span></span>
		<div class="column1">
		<!-- BEGIN faq_block -->
			<!-- IF faq_block.S_ROW_COUNT == 4 -->
				</div>

				<div class="column2">
			<!-- ENDIF -->

			<dl class="faq">
				<dt><strong>{faq_block.BLOCK_TITLE}</strong></dt>
				<!-- BEGIN faq_row -->
					<dd><a href="#f{faq_block.S_ROW_COUNT}{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></dd>
				<!-- END faq_row -->
			</dl>
		<!-- END faq_block -->
		</div>
	<span class="corners-bottom"><span></span></span></div>
</div>
Can anyone help me out please?

Many thanks!

Wookie

Re: faq_body.html edit help needed

Posted: Sun Nov 09, 2008 7:20 pm
by Wookie1664
Can anyone please help me out?

I've been playing with css files (common and tweak) all day and seem to be getting nowhere fast, maybe someone can point me in the right direction?

Many thanks

Wookie

Re: faq_body.html edit help needed

Posted: Sun Nov 09, 2008 10:24 pm
by A_Jelly_Doughnut
The only line you need to change is this one

Code: Select all

         <!-- IF faq_block.S_ROW_COUNT == 4 -->
in the code you quoted above.

Just change the 4 to whatever number you desire.

Re: faq_body.html edit help needed

Posted: Sun Nov 09, 2008 11:20 pm
by Wookie1664
Thanks Jelly

The number 4 changes the ammount of rows in column1each row is a new category. All other catergories that remain go to collumn2. So if there are 11 categories, 4 will be in column1 and 7 in column2

I want to increase the number of columns on the page from 2 to 4 and then use <!-- IF faq_block.S_ROW_COUNT == 4 --> to set how many rows are on each column.

Regards

Wookie

Re: faq_body.html edit help needed

Posted: Mon Nov 10, 2008 12:19 am
by A_Jelly_Doughnut
I see. I misunderstood the first time.

I think Its a little more difficult to do a 4 column layout in CSS, so I'd probably revert to tables for this. Something like this:

Code: Select all

<table><tr><!-- BEGIN faq_block --><td>{faq_block.STUFF}<!-- IF (faq_block.S_ROW_COUNT % 4) == 0 --> </td></tr><tr><!-- ELSE --> </td><!-- ENDIF --></tr></table

Re: faq_body.html edit help needed

Posted: Mon Nov 10, 2008 1:10 am
by Wookie1664
This is now down to one column at present, and I'm not sure what this is in the middle of the table code "faq_block.STUFF"

Regards

Wookie

Re: faq_body.html edit help needed

Posted: Wed Nov 12, 2008 1:33 pm
by Wookie1664
I'm still stuck on this, can anyone please help?

Many thanks

Wookie

Re: faq_body.html edit help needed

Posted: Fri Nov 14, 2008 1:04 am
by Wookie1664
Can this be done or am I wasting my time?

Regards

Wookie

Re: faq_body.html edit help needed

Posted: Fri Nov 14, 2008 12:46 pm
by stickerboy
Moved to Styles support

Re: faq_body.html edit help needed

Posted: Sat Nov 15, 2008 3:42 am
by prototech
Try this:

Code: Select all

<div class="panel bg1" id="faqlinks">
	<div class="inner"><span class="corners-top"><span></span></span>
		<!-- BEGIN faq_block -->
		<div style="width: 24%; margin: 0 .5%; display: block; float: left;">
			<dl class="faq">
				<dt><strong>{faq_block.BLOCK_TITLE}</strong></dt>
				<!-- BEGIN faq_row -->
					<dd><a href="#f{faq_block.S_ROW_COUNT}{faq_block.faq_row.S_ROW_COUNT}">{faq_block.faq_row.FAQ_QUESTION}</a></dd>
				<!-- END faq_row -->
			</dl>
			</div><!-- IF (faq_block.S_ROW_COUNT % 4) == 3 --><div class="clear"></div><!-- ENDIF -->
		<!-- END faq_block -->
	<span class="corners-bottom"><span></span></span></div>
</div>

Re: faq_body.html edit help needed

Posted: Sat Nov 15, 2008 10:52 am
by Wookie1664
Many, many thanks prototech. Exactly what I needed and works just fine for what I need.

Regards

Wookie