[SOLVED] Order of Articles in Category Blog Layout

Need help with the Administration of your Joomla! 1.5 site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Sat Jul 26, 2008 9:41 pm

Hi. You might try changing the # Intro to "0". If this doesn't work, can you post your URL? Also, I think you should start a new topic, since this is not related to this topic, and this topic has been solved. Thanks! Mark
Mark Dexter
"Well...how did I get here?"

User avatar
SimpleNL
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sat Aug 11, 2007 1:03 pm
Location: Amsterdam, Netherlands

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by SimpleNL » Wed Aug 06, 2008 9:51 am

In response to the code by dextercowley, I've been making a true table layout for the Blog Section Layout. That is to say, each row has it's own table row (rows of equal height!). To have it working replace lines 45 through 76 of dextercowley's code with the following:

Code: Select all

<tr>
	<td valign="top">
		<table width="100%"  cellpadding="0" cellspacing="0">
			<?php for( $z = 0, $c = ceil( $this->params->get('num_intro_articles', 4) / $this->params->get('num_columns') ); $z < $c; $z++ ) : ?>
				<tr>
					<?php $z == 0 ? $loop = 0 : $loop = $z * $this->params->get('num_columns'); ?>
					<?php for( $y = $loop; $y < ( $loop + $this->params->get('num_columns') ); $y++ ) : ?>
						<?php if ($y > $loop) : $divider = " column_separator"; endif; ?>
						<td valign="top" width="<?php echo intval(100 / $this->params->get('num_columns')) ?>%" class="article_column<?php echo $divider ?>">
							<?php 
							if ($y < $this->total && $y < ($numIntroArticles)) :
								$this->item =& $this->getItem($y, $this->params);
								echo $this->loadTemplate('item');
							endif;
							?>
						</td>
					<?php endfor; ?>
				</tr>
			<?php endfor; ?>
		</table>
	</td>
</tr>
<?php $i = $i + $this->params->get('num_intro_articles') ; ?>
This might also work for the Blog Category Layout. I will be testing that in just a minute. Edit: also works for the Blog Category Layout: replace lines 40 through 71 in dextercowley's code with the above code.

I'm also working on creating a Blog Section Layout without tables but with DIVs and such, as soon as that is done, I'll post it here.
Webdeveloper - Van Eldijk Studio's
http://www.vaneldijk.nl

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Wed Aug 06, 2008 1:42 pm

Hi. Could you please post a screenshot of what your layout looks like and the difference between that and the standard layout? Thanks. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
SimpleNL
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sat Aug 11, 2007 1:03 pm
Location: Amsterdam, Netherlands

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by SimpleNL » Wed Aug 06, 2008 3:09 pm

Allright, first, let's see what happens in your code, and in the default layout:
Image
As you can see the table consists of table cells in only one single row. This is why, when a table cell is longer, it crosses down and pushes the table cells below down. The table cells vary in height and so do the rows. In a true table the table cells should not be able to cross the red line.

Now, in my new layout, every row is actually a table row. The effect is that the height of the biggest item is the height of the table row. As you can see no table cell crosses the red line.
Image
No to make a big thing out of it, but the second is preferred behavior for a table.
Webdeveloper - Van Eldijk Studio's
http://www.vaneldijk.nl

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Wed Aug 06, 2008 4:48 pm

Thanks. Would you be willing to write up a quick Tip on the Tips and Tricks wiki? This might be handy for others to see. The Tips and Tricks link is here: http://docs.joomla.org/Category:Tips_and_tricks. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
SimpleNL
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sat Aug 11, 2007 1:03 pm
Location: Amsterdam, Netherlands

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by SimpleNL » Thu Aug 07, 2008 7:06 am

Sure, how do I log in to the wiki? I'll write something about changing from the default layout, to your layout, to my layout. Can you PM me for more details?
Webdeveloper - Van Eldijk Studio's
http://www.vaneldijk.nl

sixeyeco
Joomla! Apprentice
Joomla! Apprentice
Posts: 36
Joined: Fri Feb 15, 2008 2:37 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by sixeyeco » Fri Aug 08, 2008 6:04 am

So sorry for taking so long to post back. GF's daughter's getting married in ten days, 250 people coming... No excuses though, I dropped the ball.

These work great and should be considered for integration into Joomla core.

Thank you so much for all your hard work.

Laurenca
Joomla! Intern
Joomla! Intern
Posts: 56
Joined: Wed Jun 21, 2006 6:16 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by Laurenca » Tue Aug 12, 2008 4:39 pm

Thank you both dextercrowley and simpleNL for your solutions. I had no idea on how to go about fixing the column display issue and my css hack for fixing the height issue was not the prettiest solution. Your time and insights are very much appreciated. They worked like a charm.

jennik_prazak
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Sat Jun 28, 2008 8:20 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by jennik_prazak » Thu Aug 28, 2008 10:09 am

Guys, I was so frustrated while trying to solve this issue and you made me really happy. This all works perfectly even on latest 1.5.6 Joomla version. Thank you very much!

zitoon
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Mar 01, 2006 7:51 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by zitoon » Tue Sep 02, 2008 2:03 pm

Hello !
Nice code, but after installing it, I can't see any more Intro text, in Category blog view....
Works in section blog view....
Any idea ?

Edit :
First blog.php displays intro in category blog display
Second (with SimpleNL code) displays intro in section blog display

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Tue Sep 02, 2008 3:49 pm

Hi. I'm not sure what you mean. Do you mean the read more link is missing? or that the intro text (before the read more link) is missing? It seems to work correctly to me. Also, this feature will be included as standard in 1.5.7. Mark
Mark Dexter
"Well...how did I get here?"

zitoon
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Mar 01, 2006 7:51 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by zitoon » Tue Sep 02, 2008 4:08 pm

Sorry for my English... I'm French...
In fact this the Category or Section description that is missing.
In my menu link, I have enabled "display section or category" description... but it's missing. One for 1st Code, the Other in second code...
It's not really a problem for me, I put the right blog.php in the right folder...

Another think : is there a way to adapt this code for the front page (table rows with the same height) ?

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Tue Sep 02, 2008 4:20 pm

Yes. If you look at the template override in the beez template, it already does this for the front page and the other blogs. The file is "templates/beez/html/com_content/frontpage/default.php", I believe. Good luck. Mark
Mark Dexter
"Well...how did I get here?"

zitoon
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Wed Mar 01, 2006 7:51 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by zitoon » Tue Sep 02, 2008 4:34 pm

Thank you... I didn't noticed that, I don't use Beez template !

Hilly
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Sep 11, 2008 7:07 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by Hilly » Thu Sep 11, 2008 7:21 am

Thank you sooo much Dexter...

This fix works perfectly and was a breeze to implement with your simple instructions.

Much appreciated.

Cheers.

Hilly

User avatar
schipperijn
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Thu Apr 06, 2006 3:42 pm
Location: Leeuwarden
Contact:

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by schipperijn » Sat Sep 13, 2008 9:26 pm

Thanks you all for this great fix. I also thought it has something to do with the script/css of a template. So... not.

Have used instructions of http://docs.joomla.org/Change_Mutli-Col ... gory_Blogs
and than used both your code's, for section and blog inside Joomla 1.5.6

Works also for me

User avatar
smithveg
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 232
Joined: Thu Jun 29, 2006 7:27 am
Contact:

Re: Order of Articles in Category Blog Layout

Post by smithveg » Mon Sep 15, 2008 4:31 am

Good, the blog.php was helpful!
Thank you.

However, when i come to this page,
http://help.joomla.org/index2.php?optio ... log_Layout

There is a section discuss about the multi column order,
Multi Column Order. In multi-column blog layouts, whether to order articles Down the columns or Across the columns.
* Down. Order articles going down the first column and then over to the next column
* Across. Order articles going across the columns and then back to the first column

Any idea why i cannot see this option/setting in the blog category?
You do not have time to think about failure.
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Tue Sep 16, 2008 3:15 am

Hi. This was added in 1.5.7 so you need this latest version to see this new feature. Hope this helps. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
schipperijn
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Thu Apr 06, 2006 3:42 pm
Location: Leeuwarden
Contact:

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by schipperijn » Tue Sep 16, 2008 11:11 am

Now that is good news, thanks for info. Than I need to delete the files at html map inside template for that blog thing.
(first big testing afcourse :pop )

CoeyCoey
Joomla! Apprentice
Joomla! Apprentice
Posts: 26
Joined: Thu Feb 21, 2008 10:45 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by CoeyCoey » Mon Sep 22, 2008 1:46 am

Just upgraded to 1.5.7 and it is not fixed.

User avatar
dextercowley
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3286
Joined: Sun Apr 06, 2008 4:44 am
Location: Seattle, WA, USA

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dextercowley » Mon Sep 22, 2008 3:06 am

Hi CoeyCoey. I'm not sure what you mean. What is not fixed? What are you trying to do? What have you done? Perhaps it would be better to start a new topic instead of coming in on the end of an old and solved thread with a somewhat vague post. Thanks. Mark
Mark Dexter
"Well...how did I get here?"

User avatar
schipperijn
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 110
Joined: Thu Apr 06, 2006 3:42 pm
Location: Leeuwarden
Contact:

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by schipperijn » Mon Sep 22, 2008 11:12 am

For me it worked CoeyCoey.
You need to select at the menu what kind of behavior the blog need to have

1-2-3
4-5-6

or

1-4
2-5
3-6

panchosoft
Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Fri Sep 26, 2008 11:33 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by panchosoft » Sat Sep 27, 2008 9:47 pm

Is there any way to get rows of same height on the frontpage layout of Joomla 1.5.7?

I did it using the code SimpleNL, but the second page lists a few errors and nothing is displayed. This is because the code was made to blog layout and not for frontpage layout.

Any help would be appreciated. : )

Sorry for my bad English.

dana9marie
Joomla! Apprentice
Joomla! Apprentice
Posts: 30
Joined: Fri Sep 05, 2008 9:10 am

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by dana9marie » Sun Sep 28, 2008 10:40 pm

Just so you know, before you go all nuts and change your coding or add a new module, etc. If it's 3 articles that you're after, it does indeed work if you put 2 intros and 2 columns (so 1, 2, 2, 4). Thanks everyone for contributing to this topic, it helped me solve my problem (which was the same as everyone elses!).

Dana-Marie

sp01lt
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Mon Dec 17, 2007 4:42 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by sp01lt » Tue Sep 30, 2008 6:53 pm

The solution is awesome.

But can the alignment be done for the frontpage layout as well?

paulakreuger
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jun 01, 2008 8:56 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by paulakreuger » Wed Oct 08, 2008 12:11 pm

I have tried all the codes for blog layout, and it is not working.
I have the same problem as some people and I get as a result a really strange second page, empty but only with today´s dates!

The links at the bottom of the page are not working as well.

Does anyone have the whole page for section/category blog layout, with rows with the same height and links working at the bottom of the page, so that I can copy and paste? I guess I must be doing something wrong, but I can´t figure out what...

I´m working with 1.5.7, by the way.

Lambas
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Sep 19, 2007 2:03 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by Lambas » Mon Oct 20, 2008 7:12 pm

Im having problems too...

1.5.7 and yoo evolution

got the code from the wiki page ... it say
replace lines 45 through 66
I dont know much about coding but this wasnt make sense for my .php

So Ive tried many different things but nothing happened ... Usually im getting an error for line blabla ... and only once the page opened but there wasnt any articles and category description.

Please any help??

My default (yoo -ev.) .php has 120 lines... is it natural??

paulakreuger
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jun 01, 2008 8:56 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by paulakreuger » Mon Oct 20, 2008 7:26 pm

I changed some things in the code and now it is working for me...

I´m attaching my code in this reply (as txt, save it as blog.php, inside section/ to make it work):
section_blog_layout_as_table.txt
Hope it works for you too!
You do not have the required permissions to view the files attached to this post.

Lambas
Joomla! Apprentice
Joomla! Apprentice
Posts: 46
Joined: Wed Sep 19, 2007 2:03 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by Lambas » Tue Oct 21, 2008 4:02 pm

man i LOVE you!!!!

really :laugh:

It work fine!!!

Is it safe to leave it like that ... i saw that your .php have nothing to do with my original ...

hope to dont get any troubles later on ..


Edit: OUPS! the category description disappeared :(
Edit2: hmm. i use for a category blog and not for a section .. is there any difference???
Edit3: Ok, was my fault ... i replaced the word "section" with "category" ... (there was 5 entries)
abd now it works great... (i love you ... will not take it back :p)

paulakreuger
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Sun Jun 01, 2008 8:56 pm

Re: [SOLVED] Order of Articles in Category Blog Layout

Post by paulakreuger » Tue Oct 21, 2008 5:01 pm

thanks :-[
never change the original files, always overwrite it, creating a new folder inside your template, like that:
yourtemplate>html>com_content>section>blog.php
so you protect the core files and can always compare the files and see if something is missing ;)

i´m glad it worked.


Locked

Return to “Administration 1.5”