The Joomla! Forum ™





Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 
Author Message
PostPosted: Tue Jan 29, 2008 2:31 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Jan 19, 2008 2:22 am
Posts: 11
You can have the Section Name - Category Name shown under the article's title on the frontpage and in the article itself, but you can't have the Section Name shown in a Blog Content view (either Category or Section).

To add the option to show the Section Name (and make it Linkable) in Blog Content Category and Blog Content Section menu items:

USE AT YOUR OWN RISK & BACK UP FIRST!
it doesn't change anything big, but who knows...

in files:
/administrator/components/com_menus/content_blog_category/content_blog_category.xml
/administrator/components/com_menus/content_blog_section/content_blog_section.xml

between lines:
Code:
<param name="@spacer" type="spacer" default="" label="" description="" />


and

Code:
<param name="category" type="radio" default="0" label="Category Name" description="Show/Hide the Category the item belongs to">


add:
Code:
<!-- Show Section Names Hack -->
<param name="section" type="radio" default="0" label="Section Name" description="Show/Hide the Section the item belongs to">
   <option value="0">Hide</option>
   <option value="1">Show</option>
</param>
<param name="section_link" type="radio" default="0" label="Section Name Linkable" description="Make the Section text a link to the actual Section page">
   <option value="0">No</option>
   <option value="1">Yes</option>
</param>
<!-- Show Section Names Hack -->


Now edit the menu item(s) linking to the page(s) where you want to display the Section Name-Category Name and check the new options above Show Category Name.

Since we're at it, you might want to replace the Section Name - Category Name separator:

(back up your files first!)

in file:
/components/com_content/content.html.php

find these lines:
Code:
// writes dash between section & Category Name when both are active
if ( $params->get( 'category' ) ) {
   echo ' - ';


and change the '-' inside echo ' - '; to whatever you like, i.e.:
Code:
echo ' » ';


J!1.5 does this (the section name thing) natively, and I couldn't for the life of me figure out why 1.0.13 wouldn't do it... it seems like the option was "dropped" somehow...
It took me hours to figure how to add that darn section name, browsing the forums, googling, trying to figure out content.php... I started working with J! just two months ago, and have no PHP or programming skills, so the task started to seem a bit beyond my means, or else it was something so obvious I couldn't see it... then just when I was about to give up I thought: "Just add back the options in the menu... nah, it can't be THAT simple... but it's worth a shot..." And it worked!
Well, hopefully I didn't screw anything up, though I wonder why the option is not there to begin with...

_________________
If you don't know where you're going, chances are you will end up somewhere else.


Last edited by fractalnoise on Wed Jan 30, 2008 7:07 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Tue Jan 29, 2008 7:27 am 
Joomla! Guru
Joomla! Guru
Offline

Joined: Mon Oct 01, 2007 11:35 am
Posts: 522
If you want to enable visitors to leave comments, another way to go about it would be to install mXcomment which has options to show the section, category and other information - by editing the output html and css how you want it.


Top
 Profile  
 
PostPosted: Tue Jan 29, 2008 6:59 pm 
User avatar
Joomla! Apprentice
Joomla! Apprentice
Offline

Joined: Sat Jan 19, 2008 2:22 am
Posts: 11
True, and that's where it all started from... but mXcomment, though a really wonderful component, sort of messes things up when you have a page with some articles handled by mxc and some others that are not, even though I did my best to design a mxc template that would seamlessly integrate with the rest of the site. This works for me, though I cannot help but wonder why the options wasn't there or whether it was taken out for some reason... It seems a bit too obvious for a simple oversight...

_________________
If you don't know where you're going, chances are you will end up somewhere else.


Top
 Profile  
 
PostPosted: Wed Jan 28, 2009 5:22 pm 
Joomla! Intern
Joomla! Intern
Offline

Joined: Fri Mar 30, 2007 4:29 pm
Posts: 65
Has anyone figured out how to do this in 1.5? I've been searching and posting for 2 weeks now and still haven't found the solution.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group