1

I'm just getting into Joomla. I've successfully overridden article pages by creating an html/com_content/article directory within my template and copied the necessary files from the /com_content directory.

I've read that this is also possible for the frontpage. It seems however I'm missing the frontpage directory from my /com_content directory. Is this still supported in Joomla 2.5. I don't really want to have to use a different template for my frontpage, but it looks like this may be my only option.

Any help would be greatly appreciated.

Cheers Tom

TDH
  • 567
  • 1
  • 6
  • 22

2 Answers2

3

'frontpage' is now called 'featured'.

Override the files in /components/com_content/views/featured/tmpl

Mark Simpson
  • 2,344
  • 2
  • 23
  • 31
  • Hi Mark, thanks for getting back to me. Rather than override the fontpage this actually applied the override to the featured articles output. It may be that's how it's setup by default, but my frontpage is pretty much static just very different to the rest of the site. I've added logic into my main template to test if it's the frontpage and display different content. – TDH Feb 11 '12 at 00:43
1

The 'front page' is simply a collection of articles that you deem to be on the 'frontpage'. I'm not sure what you mean when you say you've "overridden" article pages... are you referring to the template? You don't have to do that for each article (if that's what you're implying you did).

I think perhaps you're misunderstanding how the templating system of Joomla works with regards to the site if you're overriding each article you create? There is no 'frontpage' directory because there is no real 'frontpage'; the main template you assign with address the frontpage and all other pages on the site (every article) unless otherwise told not to.

So adjust your main template to adjust your frontpage. I think you're using template overrides in the wrong way.

Hanny
  • 2,078
  • 6
  • 24
  • 52
  • 1
    Allow me to clarify - by 'wrong way' I simply mean that you can create 1 template to customize the look/layout feel of the entire site - it will be applied to articles and the frontpage both unless you want drastically different looks for each in which case you can either address that through html/css; template overrides. But it sounds like you're doing more work that necessary that would be covered by creating a template the right way from the start. – Hanny Feb 09 '12 at 14:48
  • Hi Hanny, I was simply going by what the [joomla wiki](http://docs.joomla.org/Giving_the_Front_Page_a_different_style_from_other_pages#Create_or_Update_a_Frontpage_Blog_Layout_Override) was stating. I think I may have the wrong end of the stick though. I've added logic in my main template to test if it's the frontpage and display different content. `if ($menu->getActive() == $menu->getDefault()) { $home_page = true; } ` Does this seem reasonable? – TDH Feb 11 '12 at 00:46
  • 1
    Ideally that template will just display the module positions created in it and style the pages accordingly with the proper css. – Hanny Feb 13 '12 at 18:57
  • 1
    The template makes all the pages uniformly look the same. The wiki you linked to is an example on how to make the CSS for the frontpage specifically look different than the rest of the site. You said you didn't want to do this. I think you're misunderstanding how templates work with joomla. At the core you have Joomla and all it's articles... the template is how that gets wrapped up and presented to the users. One template automatically applies to ALL of joomla (all articles); the only time you should ever have to code articles individually is if you want them to look different. – Hanny Feb 13 '12 at 19:00
  • 1
    I guess a better question is - what are you trying to accomplish? I'm not sure why you're even using template overrides. in the first place? Do you want each page to be different or are you trying to make it all uniform? You mention what you've done, but not what you're trying to do - which makes it hard to answer accurately. But the link you posted should allow you to format your CSS for just the frontpage appropriately. – Hanny Feb 13 '12 at 19:04
  • Thanks for getting back to me Hanny. Basically I wanted my homepage to display differently to the other pages. With a combination of a body class on the homepage and positioning different modules I've managed to achieve this. Thanks for your help, you've helped me to understand Joomla a little better. – TDH Feb 13 '12 at 23:03