010 - Create a Joomla! 1.5 module listing all of the items in a given category
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Weeeeell, my first implementation was using unordered lists, but the code output was not to my liking. I tried that again, but the result was again unsatisfactory. As a compromise, I modified the category spans to be list items, and left the section spans as they are, in order to escape the double indentation my previous implementation wielded. Please let me know if I should commit these changes to the package.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
I think unordered lists since that builds consistency with menu items, etc.
Thanks!
Amy
Thanks!
Amy
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
I'm attaching screenshots of the different setups I'm trying.
Here is the HTML code:
The style attributes are just a quick hack. If anyone can help me align the items properly, I'd greatly appreciate it.
EDIT: I'm also attaching the module's tmpl/default.php in case I erred there. This is getting vexing.
- section names are s and category names are s
- both section and category names are s
- both section and category names are s (the whole is colored green, the section names are white and the category names are yellow)
Here is the HTML code:
Code: Select all
<div class="ghop-categories">
<ul style="border: 1px black solid; background: green;">
<li style="background: white; border: 1px black dotted;">About Joomla!</li><ul>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=25&Itemid=37&layout=blog">The Project</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=29&Itemid=37&layout=blog">The CMS</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=30&Itemid=37&layout=blog">The Community</a></li>
</ul>
<li style="background: white; border: 1px black dotted;">News</li><ul>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=1&Itemid=50&layout=blog">Latest</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=3&layout=blog">Newsflash</a></li>
</ul>
<li style="background: white; border: 1px black dotted;">FAQs</li><ul>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=31&Itemid=46&layout=blog">General</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=28&Itemid=44&layout=blog">Current Users</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=27&Itemid=44&layout=blog">New to Joomla!</a></li>
<li style="background: yellow;"><a href="/joomla/index.php?option=com_content&view=category&id=32&Itemid=47&layout=blog">Languages</a></li>
</ul>
</ul>
</div>
EDIT: I'm also attaching the module's tmpl/default.php in case I erred there. This is getting vexing.
You do not have the required permissions to view the files attached to this post.
Last edited by fealebenpae on Sun Dec 09, 2007 6:38 pm, edited 1 time in total.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
I've hit another problem here, a much more severe one.
I use the following code to generate the URL:
This works ok for normal URLs, but if I enable SEF... Blog and Table layouts no longer work. At all. It should work - I'm passing everything through JRoute. Should I leave it as it is and wait for a fix in the SEF code or what? I looked through the API and the source code of the latest SVN, but it availed me nothing.
I hope someone can provide a hint. Thanks.
I use the following code to generate the URL:
Code: Select all
$content_route = ContentHelperRoute::getCategoryRoute($cat_row->id, $sec_row->id);
if($params->get('layout')=='table') $lists[$i]->category[$n]->link = JRoute::_(str_replace('&layout=blog','',$content_route));
else {
if(stristr($content_route, '&layout=blog')) $lists[$i]->category[$n]->link = JROUTE::_($content_route);
else $lists[$i]->category[$n]->link = JROUTE::_($content_route.'&layout=blog');
}
I hope someone can provide a hint. Thanks.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Make certain you have an up-to-date J! v 1.5 - nightlies can be downloaded from the Developer link, above - look for download.
This weekend, there were LOTS of fixes to URLs.
HTH,
Amy
This weekend, there were LOTS of fixes to URLs.
HTH,
Amy
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Thanks for the quick response, Amy.
I'm sorry to say that I just tested this on the latest SVN (circa ~5 minutes ago ) and the result is the same. Joomla 1.0 preserves such options in its SEF URLs (for instance - /layout,blog/) while J! 1.5 seems not to. I think I'll just leave it as it is and go back to the lists thing.
I'm sorry to say that I just tested this on the latest SVN (circa ~5 minutes ago ) and the result is the same. Joomla 1.0 preserves such options in its SEF URLs (for instance - /layout,blog/) while J! 1.5 seems not to. I think I'll just leave it as it is and go back to the lists thing.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Okay... this is a bug.
Posted on:
http://forum.joomla.org/index.php/topic,242558.0.html
As a workaround you could do a replace to switch the & for a ?, but this should be fixed hopefully soon, so shouldn't be needed.
Ian
Posted on:
http://forum.joomla.org/index.php/topic,242558.0.html
As a workaround you could do a replace to switch the & for a ?, but this should be fixed hopefully soon, so shouldn't be needed.
Ian
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Thanks, Ian.
While that worked for the blog layout, content that is linked to via the menu and is set to be displayed in a blog layout (e.g. the news categories in the example content) won't display in a table layout, even after I've attached ?layout=default. I even remove the layout=blog part from the content route before it is passed to JRoute. I'll look into the issue in a few days. But then again I want to leave it as it is in the hopes that it will work once the URL issues are resolved, be done with the lists thing and this time really submit the module for a final review as I hope to be able to work on another task after I've completed this one to the community's and mine satisfaction.
While that worked for the blog layout, content that is linked to via the menu and is set to be displayed in a blog layout (e.g. the news categories in the example content) won't display in a table layout, even after I've attached ?layout=default. I even remove the layout=blog part from the content route before it is passed to JRoute. I'll look into the issue in a few days. But then again I want to leave it as it is in the hopes that it will work once the URL issues are resolved, be done with the lists thing and this time really submit the module for a final review as I hope to be able to work on another task after I've completed this one to the community's and mine satisfaction.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Hey!
There are a couple of things here that we need to work out on our end to get this all straightened out. You, on your part, have done an excellent job and we commend you on your efforts.
If you can submit your completed code that you have at this point, with the second option - the ul and ul without the green and yellow styling (this styling is done in the template CSS), then we will sign off on the great work you have done and mark you as complete here and on google.
Ian
There are a couple of things here that we need to work out on our end to get this all straightened out. You, on your part, have done an excellent job and we commend you on your efforts.
If you can submit your completed code that you have at this point, with the second option - the ul and ul without the green and yellow styling (this styling is done in the template CSS), then we will sign off on the great work you have done and mark you as complete here and on google.
Ian
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
oh and one more thing:
If you can add Helper onto the end of your helper class name that would be fantastic so we can keep it consistent with the rest of the modules.
Ian
If you can add Helper onto the end of your helper class name that would be fantastic so we can keep it consistent with the rest of the modules.
Ian
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
All done, folks.
I tested this on a vanilla svn install and it worked marvelously, even the lists thing, save for the sef thing, of course. I wouldn't have been able to do this without the support and feedback from this wonderful community, so thanks to everyone who helped
I uploaded the final version to joomlacode.
I tested this on a vanilla svn install and it worked marvelously, even the lists thing, save for the sef thing, of course. I wouldn't have been able to do this without the support and feedback from this wonderful community, so thanks to everyone who helped
I uploaded the final version to joomlacode.
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Thanks very much for your excellent work ethic, sharing your intelligence and interacting so nicely with the community. I closed the Google task and will mark this thread as solved. You are free to select another task, if you want. I hope you do! There are some very cool development tasks available.
Again, thank you for your contributions to the Joomla! community and for participating in the GHOP contest. You've been a pleasure to work with,
Amy
Again, thank you for your contributions to the Joomla! community and for participating in the GHOP contest. You've been a pleasure to work with,
Amy
- fealebenpae
- Joomla! Intern
- Posts: 54
- Joined: Fri Nov 30, 2007 8:33 pm
- Location: Vidin, Bulgaria
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
On the contrary, the pleasure is all mine :-D
Now, I be moving on to the pirate speak task, arr me timbers!
Now, I be moving on to the pirate speak task, arr me timbers!
And it came to pass that in that time the Great God Om spake unto Brutha, the Chosen One: "Psst!"
- ianmac
- Joomla! Virtuoso
- Posts: 4784
- Joined: Sat Sep 24, 2005 11:01 pm
- Location: Toronto, Canada
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Hey!
Can you just make sure you submit your final code to google as well?
Thanks,
Ian
Can you just make sure you submit your final code to google as well?
Thanks,
Ian
-
- Joomla! Champion
- Posts: 7018
- Joined: Wed Nov 22, 2006 3:35 pm
- Location: Nebraska
- Contact:
Re: 010 - Create a Joomla! 1.5 module listing all of the items in a given catego
Yes, he already did so before I closed the Google task. Now, he's on to Pirate talk - oh wait - he decided to implement the entire Text Filter Suite for Wordpress.
We are good, thanks, Ian.
Amy
We are good, thanks, Ian.
Amy