Trying To Override "intro_image.php" - Question | JoomShaper

Trying To Override "intro_image.php"

I

infini

Helix Framework 11 months ago

im trying to override the intro_image.php file in the folder structure "templates/shaper_helixultimate/html/layouts/joomla/content/intro_image.php"

it essentially has only this line:

require HelixUltimate\Framework\Platform\HTMLOverride::loadTemplate();

i've used the template "Create Overrides", and it creates a new file "intro_image-20230512-233805.php" which is basically the intro_image-{date}.php

when i copy the contents of that new file into intro_image.php, the images are no longer linked like they were.

i feel if i were to have just copy/pasted the contents, it should work exactly the same? but im finding its not the case.

1.) how i can override the intro_image.php in helix ultimate 2.0.12?

0
8 Answers
I
infini
Accepted Answer
11 months ago #116407

okay!

i just echo HelixUltimate\Framework\Platform\HTMLOverride::loadTemplate();

and i found the path.

0
Ofi Khan
Ofi Khan
Accepted Answer
Support Agent 11 months ago #116411

Hello infini

Glad to know that you have found the solution.

Best regards

0
Pavel
Pavel
Accepted Answer
11 months ago #116417

how i can override the intro_image.php in helix ultimate 2.0.12?

Hi. Just in case, if you have not fully dealt with this. In the case when something is already overrided and comes out of the box, you should use the overrides folder instead of the HTML folder

templates/shaper_helixultimate/overrides/layouts/joomla/content/intro_image.php

1
I
infini
Accepted Answer
11 months ago #116506

thank you, Pavel - for the extra information. i have indeed not been working in the override folder. i assume, it is because it is the safest folder to work in, the other html folder is the template folder that could be overwritten in the future template update.?

much appreciated, Pavel! thanks again!

0
Pavel
Pavel
Accepted Answer
11 months ago #116530

Yes, if you change the files that are delivered with the template in the HTML folder, then these files will be overwritten when updating and you will lose all changes. Overrides folder - a special folder for overriding such files. Look at Helix documentation about override system.

To override any other files that are not included in the supply of the template, you should use the HTML folder.

1
I
infini
Accepted Answer
10 months ago #118900

Hey @Pavel (if you're still monitoring..) or @JoomShaper (if you're still monitorin..),

Question about override. how about when i create a new alternate Blog Layout, like this example.. https://www.joomlashack.com/blog/joomla/custom-category-layout/

I created a new custom layout in the override folder, but it did not recognize the new layout, so I moved it to the template/shaper_helixultimate/html/com_content/category folder, and then it recognized it and i could use it.

how do i use the override folder in this scenario, or is it okay to use the html folder in this instance? or should be redirecting it from the html folder to the override? not sure how to do that one.

0
Pavel
Pavel
Accepted Answer
10 months ago #118941

Hi.

The override folder is intended only for layouts included in the supply of Helix and having the default file names. For any other layouts and file names, you should use the standard html folder .

Example:

If you want to override category/blog.php, you should use the override folder.

If you want to create a new one, your own override with a file name, different from the default, like category/myblog.php, you should use the html folder and the standard means of Joomla (if need) to create overrides.

The entire list of files for which you should use the override folder, you can find in plugins/system/helixultimate/overrides

0
I
infini
Accepted Answer
10 months ago #119555

Thank you , Pavel!

0