0

In the past when I did an article override I used to get:

default.php default_item.php default_links.php default_child.php

all of which were placed in templates/MYTEMPLATE/html/com_content/article/

Now when I do an override I only get default.php and default_links.php. The old default.php used to contain the part which has span12 in it. Here's the code in question which can be found on any single article page.

<div class="platform-content row-fluid">
  <div class="span12">
    <!-- the start of my single article override -->
    <div class="local-area">

When I look in components/com_content/views/article/tmpl I still don't see the oldfiles to copy.

  1. What happened to them and why?
  2. How do old overrides still work?
  3. And most of all, how can I remove span12 from the div prior to the article? I'm doing a pretty big override and I need to put something just before that. I know I can do this with JavaScript but I prefer to use an override if possible.
  • It will be great if you post some code and file/folder structure in question , Code always tells you true story :) – Sudhir Sapkal Apr 19 '18 at 6:57
  • I'm not sure how to do this, you want me to share the entire code of a single article view? I have changed my question to add just the code I want. – Eoin Apr 20 '18 at 15:12
0

The span12 is probably not created by the override or the content component. Check to see if it appears before all component div wrappers. If it is before every component, it is created by the template layout.

To change this you will want to change the template’s index.php file. Some template creators split the layout into several PHP files. If so, you will want to look for a file called component.php or something similar.

However, you will want to be careful removing the span12 class from the template itself. It could cause problems with other components or the page layout.

  • Hmm, ok I'll look there. This definitely used to be part of the override system. – Eoin Apr 23 '18 at 20:37
  • This just can't be the template as it's not using Bootstrap. It is definitely Joomla! core and part of the article page. – Eoin Jan 2 at 17:40
  • If you run a search through the Joomla 3 core source code, you will NOT find span12 anywhere that impacts the frontend layout of your articles. It is definitely NOT from the Joomla core. Both span12 and row-fluid are Boostrap 2 classes. If it is not your template, it is a plugin. However, creating a plugin to add the HTML would be a really strange idea. I am 98% sure it is caused by the template. Use a CLI to run a search for span12 in your Joomla site or download the template and search it on your local computer. – D. Morell Jan 2 at 18:01
  • 1
    It is coming from your Gantry template. libraries/gantry5/classes/Gantry/Framework/Platform.php line 31. Your template is using $component_wrapper somewhere. – D. Morell Jan 2 at 21:18
  • 1
    I searched Gantry for 'platform-content'. Once I downloaded it, it only took a minute to find. It looks like Platform.php uses it on lines 46 and 261 but that is it. The second one looks like it probably the source of the issue. – D. Morell Jan 2 at 21:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.