[Closed] Customizing Category Listing layout

  • Lisa Norman
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
14 years 11 months ago #11 by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
What I decided to do was to pull a module into the top of the course listing and let the user edit the text of the module to be the heading. She wants a very simplified course listing on this page, so I've modified it to just pull her description. I realize that I could use Joomdle to include the amounts, etc. but this layout makes her happy. Each of the titles links to a Joomla article with more information on the course and then that article links to the button where they can buy the course.

<?php defined('_JEXEC') or die('Restricted access'); ?>

<?php
$index_url = JURI::base()."index.php";
$itemid = JoomdleHelperContent::getMenuItem();

if (is_array($this->categories)) :
?>

<div width="90%" class="contentpane<?php echo $this->params->get( 'pageclass_sfx' ); ?>">
<?php
$modules = &JModuleHelper::getModules('joomdlecat');
foreach($modules AS $module) {
echo JModuleHelper::renderModule($module, array('style' => 'module_style'));
}
?>

<h2 style="padding-top:20px;padding-bottom:0px;font-size:2em;text-decoration:underline;">Courses Available:</h2>

<?php endif; // sub cats ?>

<?php if ((!is_array($this->categories)) || (is_array ($this->cursos))) : ?>
<?php
if (is_array ($this->cursos))
foreach ($this->cursos as $curso) : ?>
<div class="courselistentry" style="text-align:left;max-width:700px;line-height:1.6em;">
<ul>
<li class="courselist"><?php $url = JRoute::_("index.php?option=com_joomdle&view=detail&cat_id=".$curso.":".JFilterOutput::stringURLSafe($curso)."&course_id=".$curso.':'.JFilterOutput::stringURLSafe($curso)."&Itemid=$itemid"); ?>
<?php echo nl2br($curso); ?>
<br /></li>
</ul>
</div>
<?php endforeach; ?>
<?php endif; // there are courses ?>
</div>

Please Log in or Create an account to join the conversation.

  • Lisa Norman
  • Topic Author
  • Offline
  • Premium Member
  • Premium Member
More
14 years 11 months ago #12 by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
I'm sure my solution is far from elegant (and probably has extra code floating around...) but it works.

Thank you for your wonderful component!

Please Log in or Create an account to join the conversation.

More
14 years 11 months ago #13 by Chris
Replied by Chris on topic Re: Customizing Category Listing layout
Thanks for posting your solution. Glad you got something going for your client.

Please Log in or Create an account to join the conversation.