faq_body.html edit help needed

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Get Involved
Locked
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

faq_body.html edit help needed

Post 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
Last edited by prototech on Sat Nov 15, 2008 5:27 pm, edited 1 time in total.
Reason: Topic icon changed
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post 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
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: faq_body.html edit help needed

Post 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.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post 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
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: faq_body.html edit help needed

Post 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
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post 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
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post by Wookie1664 »

I'm still stuck on this, can anyone please help?

Many thanks

Wookie
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post by Wookie1664 »

Can this be done or am I wasting my time?

Regards

Wookie
User avatar
stickerboy
Former Team Member
Posts: 7349
Joined: Mon Mar 29, 2004 2:27 pm
Location: Airdrie, UK (127.0.0.1)
Name: Kenny Cameron
Contact:

Re: faq_body.html edit help needed

Post by stickerboy »

Moved to Styles support
I'm a web-designing code-decrypting tech-support musician
|| Twitter || Flickr || phpBB Snippets ||
Formerly known as cherokee red
User avatar
prototech
Former Team Member
Posts: 5406
Joined: Mon Mar 19, 2007 2:04 pm
Location: Southern California

Re: faq_body.html edit help needed

Post 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>
Need help with MOD/style installations or other phpBB problems? Contact me for a quote.
Wookie1664
Registered User
Posts: 65
Joined: Mon Jul 07, 2008 12:19 pm

Re: faq_body.html edit help needed

Post by Wookie1664 »

Many, many thanks prototech. Exactly what I needed and works just fine for what I need.

Regards

Wookie
Locked

Return to “[3.0.x] Styles Support & Discussion”