- Posts: 129
[Closed] Customizing Category Listing layout
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
15 years 20 hours ago - 14 years 11 months ago #1
by Lisa Norman
[Closed] Customizing Category Listing layout was created by Lisa Norman
I'm using Moodle 2.0
Joomla 1.5.23
and Joomdle 0.5
I have the course listing in a wrapper from a menu item: Joomdle » Coursecategory
I've customized the layout...probably too much, but it looks fantastic with our site. However...I can't seem to find the variable to pull the category description from Moodle into Joomla for the template.
I've fudged it by just copying the code (ack) but would really like to pull the data from the database so the customer can update it herself. What am I missing? Can you tell me what variable I should be accessing?
Thanks for an AWESOME component!
Joomla 1.5.23
and Joomdle 0.5
I have the course listing in a wrapper from a menu item: Joomdle » Coursecategory
I've customized the layout...probably too much, but it looks fantastic with our site. However...I can't seem to find the variable to pull the category description from Moodle into Joomla for the template.
I've fudged it by just copying the code (ack) but would really like to pull the data from the database so the customer can update it herself. What am I missing? Can you tell me what variable I should be accessing?
Thanks for an AWESOME component!
Last edit: 14 years 11 months ago by Chris.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
15 years 8 hours ago #2
by Chris
Replied by Chris on topic Re: Customizing Category Listing layout
Assuming you are using Joomdle R0.52,
Look at com_joomdle/views/joomdle/tmpl/default.php, you will see around line 31
<br /><span class="description"><?php echo nl2br($curso); ?></span>
Is this what you are looking for?
Look at com_joomdle/views/joomdle/tmpl/default.php, you will see around line 31
<br /><span class="description"><?php echo nl2br($curso); ?></span>
Is this what you are looking for?
Please Log in or Create an account to join the conversation.
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 129
15 years 6 hours ago #3
by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
Where can I tell if I am on 0.52 or not?
My Joomdle Control Panel says: You are using Joomdle 0.5
Which makes me wonder. I vaguely remember something scary like I need to uninstall and reinstall to do the upgrade?
When I look at that layout, it is showing the summary of each course. What I'm looking for is the Category summary -- the description that goes with the category, so it is in our case an introduction into all of the courses.
Thanks for any help you can give me. Maybe I'm just on the wrong version?
My Joomdle Control Panel says: You are using Joomdle 0.5
Which makes me wonder. I vaguely remember something scary like I need to uninstall and reinstall to do the upgrade?
When I look at that layout, it is showing the summary of each course. What I'm looking for is the Category summary -- the description that goes with the category, so it is in our case an introduction into all of the courses.
Thanks for any help you can give me. Maybe I'm just on the wrong version?
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 11 months ago - 14 years 11 months ago #4
by Chris
Replied by Chris on topic Re: Customizing Category Listing layout
Sorry, I misread your request ....
You will find the course category description in use in the course categories view which can be seen in this function
com_joomdle/views/coursecategories/tmpl/default.php
around line 30
<br /><span class="description"><?php echo nl2br($cat); ?></span>
You can tell your joomdle version from the control panel
For upgrading, at this time, you are correct you must uninstall and re-install. We do not have an upgrade procedure. Thus you would be best to take a screen shot of your configuration screen and remember to uninstall and install the moodle side too.
Also, it would be great to see how you modified the views to match your site. Could you post a link, or if you prefer a private line, or even drop us an email to development@joomdle.com.
Regards
Chris
You will find the course category description in use in the course categories view which can be seen in this function
com_joomdle/views/coursecategories/tmpl/default.php
around line 30
<br /><span class="description"><?php echo nl2br($cat); ?></span>
You can tell your joomdle version from the control panel
For upgrading, at this time, you are correct you must uninstall and re-install. We do not have an upgrade procedure. Thus you would be best to take a screen shot of your configuration screen and remember to uninstall and install the moodle side too.
Also, it would be great to see how you modified the views to match your site. Could you post a link, or if you prefer a private line, or even drop us an email to development@joomdle.com.
Regards
Chris
Last edit: 14 years 11 months ago by Chris.
Please Log in or Create an account to join the conversation.
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 129
14 years 11 months ago #5
by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
So that's only going to work on version 0.52.
Sigh. (I'm terrified of the upgrade. I barely got it working last time.)
Okay, I'll get this upgraded and give it a shot. I'll send you a copy of the template over-ride. It isn't fancy, but I do like it and the customer is tickled.
Sigh. (I'm terrified of the upgrade. I barely got it working last time.)
Okay, I'll get this upgraded and give it a shot. I'll send you a copy of the template over-ride. It isn't fancy, but I do like it and the customer is tickled.
Please Log in or Create an account to join the conversation.
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 129
14 years 11 months ago #6
by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
Sorry for the slow response. I had a computer crash that delayed the upgrade. I've now completed it and it seems to be working, but... I'm still missing something. Here is our current layout:
www.margielawson.com/lawson-writers-academy
It is based on the coursecategory listing. It is far from perfect. The summary at the top is NOT coming from the database, but hard-coded into the template. You'll notice many other odd things. The customer wants a specific format for course descriptions -- so each course listing has 2 titles: the first is the standard Joomdle link to the course description. The second is her attempt to display it the way she wants. I can probably get that part working for her.
But what I can't seem to get to work is to pull that summary from the database. When I use the category listing that shows the summary, it does show, but it does not show the classes under that category. I've tried copying the code, but seem to get an either/or situation.
So, my next step, I guess is to start doing some deeper analysis of what is going on here. If you have any hints to give me, I'd appreciate it.
Thanks for creating a great component.
www.margielawson.com/lawson-writers-academy
It is based on the coursecategory listing. It is far from perfect. The summary at the top is NOT coming from the database, but hard-coded into the template. You'll notice many other odd things. The customer wants a specific format for course descriptions -- so each course listing has 2 titles: the first is the standard Joomdle link to the course description. The second is her attempt to display it the way she wants. I can probably get that part working for her.
But what I can't seem to get to work is to pull that summary from the database. When I use the category listing that shows the summary, it does show, but it does not show the classes under that category. I've tried copying the code, but seem to get an either/or situation.
So, my next step, I guess is to start doing some deeper analysis of what is going on here. If you have any hints to give me, I'd appreciate it.
Thanks for creating a great component.
Please Log in or Create an account to join the conversation.
- Chris
-
- Offline
- Moderator
-
14 years 11 months ago #7
by Chris
Replied by Chris on topic Re: Customizing Category Listing layout
If this is the layout you are trying to achieve, the first question I would ask myself is how often will the content at the top change? If not very often, which it does not appear as though it will, I would place that in a Joomla article and then pull in the courses through the article instead. As for the course title, this is just a matter of playing with the css I would have thought.
Please Log in or Create an account to join the conversation.
- Antonio Durán
-
- Offline
- Moderator
-
Less
More
- Posts: 7926
14 years 11 months ago #8
by Antonio Durán
Replied by Antonio Durán on topic Re: Customizing Category Listing layout
Hi.
In coursecategory/tmpl/default.php you will see:
echo " ".$this->cat_name;
To get this info, it does this in view.html.php:
$this->cat_name = JoomdleHelperContent::call_method ('get_cat_name', $id);
So, it uses a web services to get the name of the category.
You may do the same (create a new webservice) to get the category description.
Alternatively, if you know that every category holds a course at least, you could read that info from here:
$cat
In any element of the $this->categories array.
Hope that helps.
Antonio
In coursecategory/tmpl/default.php you will see:
echo " ".$this->cat_name;
To get this info, it does this in view.html.php:
$this->cat_name = JoomdleHelperContent::call_method ('get_cat_name', $id);
So, it uses a web services to get the name of the category.
You may do the same (create a new webservice) to get the category description.
Alternatively, if you know that every category holds a course at least, you could read that info from here:
$cat
In any element of the $this->categories array.
Hope that helps.
Antonio
Please Log in or Create an account to join the conversation.
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 129
14 years 11 months ago #9
by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
Both of those answers interested me.
How do I pull courses into the article? (Off to study that)
Antonio, thank you -- that's exactly what I was looking for! (But now I'm distracted by Chris' idea, too.)
I'm not sure how often she will change it, but she is extremely comfortable changing a Joomla article. She's doing good with Moodle, too, though. I'm just trying to make it so she isn't having to do double work.
Or: re the double links -- well, if you look at the page it links to, you'll see it is a Joomla article, not the moodle description. Actually, there are 2 links -- first title goes to moodle, 2nd one goes to Joomla article she created. They are so similar, I'm pretty sure I can just modify the course detail layout to match her article format and then clean up her moodle descriptions. I think it is that she wants the paypal button on that detail page.
Again, thank you gentlemen!
How do I pull courses into the article? (Off to study that)
Antonio, thank you -- that's exactly what I was looking for! (But now I'm distracted by Chris' idea, too.)
I'm not sure how often she will change it, but she is extremely comfortable changing a Joomla article. She's doing good with Moodle, too, though. I'm just trying to make it so she isn't having to do double work.
Or: re the double links -- well, if you look at the page it links to, you'll see it is a Joomla article, not the moodle description. Actually, there are 2 links -- first title goes to moodle, 2nd one goes to Joomla article she created. They are so similar, I'm pretty sure I can just modify the course detail layout to match her article format and then clean up her moodle descriptions. I think it is that she wants the paypal button on that detail page.
Again, thank you gentlemen!
Please Log in or Create an account to join the conversation.
- Lisa Norman
- Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 129
14 years 11 months ago #10
by Lisa Norman
Replied by Lisa Norman on topic Re: Customizing Category Listing layout
Thinking about this again, I don't want to hack any core Joomdle files. It is hard enough to upgrade as it is without setting myself up to crash the links during an upgrade. I'm comfortable with the layout over-rides.
The user is so comfortable with the Joomla articles and prefers to lay out the class overviews in her own style, so I think I'll just let her use the articles instead of trying to link into Moodle.
We have an additional headache that her layout has a dynamic header that changes -- often. So I can't make the Moodle layout identical without updating it...at least, not that I can see off-hand. It works great in the wrapper, however.
From what I can tell, trying to bring in the course descriptions into an article directly from Moodle risks me going to an unwrapped Moodle window -- losing that header.
I may be completely off on this, but I think I'll just surrender and let her copy the descriptions and paste them into articles. She's happy and doesn't mind the "double" work.
Thanks for the help, though.
The user is so comfortable with the Joomla articles and prefers to lay out the class overviews in her own style, so I think I'll just let her use the articles instead of trying to link into Moodle.
We have an additional headache that her layout has a dynamic header that changes -- often. So I can't make the Moodle layout identical without updating it...at least, not that I can see off-hand. It works great in the wrapper, however.
From what I can tell, trying to bring in the course descriptions into an article directly from Moodle risks me going to an unwrapped Moodle window -- losing that header.
I may be completely off on this, but I think I'll just surrender and let her copy the descriptions and paste them into articles. She's happy and doesn't mind the "double" work.
Thanks for the help, though.
Please Log in or Create an account to join the conversation.