[SOLVED] Order of Articles in Category Blog Layout
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.
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.
- dextercowley
- 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
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?"
"Well...how did I get here?"
- SimpleNL
- Joomla! Apprentice
- Posts: 23
- Joined: Sat Aug 11, 2007 1:03 pm
- Location: Amsterdam, Netherlands
Re: [SOLVED] Order of Articles in Category Blog Layout
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:
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.
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') ; ?>
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
http://www.vaneldijk.nl
- dextercowley
- 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
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?"
"Well...how did I get here?"
- SimpleNL
- Joomla! Apprentice
- Posts: 23
- Joined: Sat Aug 11, 2007 1:03 pm
- Location: Amsterdam, Netherlands
Re: [SOLVED] Order of Articles in Category Blog Layout
Allright, first, let's see what happens in your code, and in the default layout:
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.
No to make a big thing out of it, but the second is preferred behavior for a table.
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.
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
http://www.vaneldijk.nl
- dextercowley
- 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
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?"
"Well...how did I get here?"
- SimpleNL
- Joomla! Apprentice
- Posts: 23
- Joined: Sat Aug 11, 2007 1:03 pm
- Location: Amsterdam, Netherlands
Re: [SOLVED] Order of Articles in Category Blog Layout
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
http://www.vaneldijk.nl
-
- Joomla! Apprentice
- Posts: 36
- Joined: Fri Feb 15, 2008 2:37 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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.
These work great and should be considered for integration into Joomla core.
Thank you so much for all your hard work.
-
- Joomla! Intern
- Posts: 56
- Joined: Wed Jun 21, 2006 6:16 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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.
-
- Joomla! Apprentice
- Posts: 8
- Joined: Sat Jun 28, 2008 8:20 am
Re: [SOLVED] Order of Articles in Category Blog Layout
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!
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Mar 01, 2006 7:51 am
Re: [SOLVED] Order of Articles in Category Blog Layout
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
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
- dextercowley
- 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
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?"
"Well...how did I get here?"
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Mar 01, 2006 7:51 am
Re: [SOLVED] Order of Articles in Category Blog Layout
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) ?
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) ?
- dextercowley
- 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
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?"
"Well...how did I get here?"
-
- Joomla! Apprentice
- Posts: 9
- Joined: Wed Mar 01, 2006 7:51 am
Re: [SOLVED] Order of Articles in Category Blog Layout
Thank you... I didn't noticed that, I don't use Beez template !
-
- Joomla! Fledgling
- Posts: 1
- Joined: Thu Sep 11, 2008 7:07 am
Re: [SOLVED] Order of Articles in Category Blog Layout
Thank you sooo much Dexter...
This fix works perfectly and was a breeze to implement with your simple instructions.
Much appreciated.
Cheers.
Hilly
This fix works perfectly and was a breeze to implement with your simple instructions.
Much appreciated.
Cheers.
Hilly
- schipperijn
- Joomla! Enthusiast
- Posts: 110
- Joined: Thu Apr 06, 2006 3:42 pm
- Location: Leeuwarden
- Contact:
Re: [SOLVED] Order of Articles in Category Blog Layout
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
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
Qua Patet Orbis http://www.coconutswebdesign.nl http://www.coconutshosting.nl
- smithveg
- Joomla! Enthusiast
- Posts: 232
- Joined: Thu Jun 29, 2006 7:27 am
- Contact:
Re: Order of Articles in Category Blog Layout
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?
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
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65
- dextercowley
- 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
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?"
"Well...how did I get here?"
- schipperijn
- Joomla! Enthusiast
- Posts: 110
- Joined: Thu Apr 06, 2006 3:42 pm
- Location: Leeuwarden
- Contact:
Re: [SOLVED] Order of Articles in Category Blog Layout
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 )
(first big testing afcourse )
Qua Patet Orbis http://www.coconutswebdesign.nl http://www.coconutshosting.nl
-
- Joomla! Apprentice
- Posts: 26
- Joined: Thu Feb 21, 2008 10:45 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
Just upgraded to 1.5.7 and it is not fixed.
- dextercowley
- 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
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?"
"Well...how did I get here?"
- schipperijn
- Joomla! Enthusiast
- Posts: 110
- Joined: Thu Apr 06, 2006 3:42 pm
- Location: Leeuwarden
- Contact:
Re: [SOLVED] Order of Articles in Category Blog Layout
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
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
Qua Patet Orbis http://www.coconutswebdesign.nl http://www.coconutshosting.nl
-
- Joomla! Fledgling
- Posts: 3
- Joined: Fri Sep 26, 2008 11:33 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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.
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.
-
- Joomla! Apprentice
- Posts: 30
- Joined: Fri Sep 05, 2008 9:10 am
Re: [SOLVED] Order of Articles in Category Blog Layout
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
Dana-Marie
-
- Joomla! Apprentice
- Posts: 7
- Joined: Mon Dec 17, 2007 4:42 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
The solution is awesome.
But can the alignment be done for the frontpage layout as well?
But can the alignment be done for the frontpage layout as well?
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sun Jun 01, 2008 8:56 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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.
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.
-
- Joomla! Apprentice
- Posts: 46
- Joined: Wed Sep 19, 2007 2:03 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
Im having problems too...
1.5.7 and yoo evolution
got the code from the wiki page ... it say
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??
1.5.7 and yoo evolution
got the code from the wiki page ... it say
I dont know much about coding but this wasnt make sense for my .phpreplace lines 45 through 66
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??
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sun Jun 01, 2008 8:56 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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): Hope it works for you too!
I´m attaching my code in this reply (as txt, save it as blog.php, inside section/ to make it work): Hope it works for you too!
You do not have the required permissions to view the files attached to this post.
-
- Joomla! Apprentice
- Posts: 46
- Joined: Wed Sep 19, 2007 2:03 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
man i LOVE you!!!!
really
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 )
really
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 )
-
- Joomla! Apprentice
- Posts: 5
- Joined: Sun Jun 01, 2008 8:56 pm
Re: [SOLVED] Order of Articles in Category Blog Layout
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.
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.