C5 File Structure?

Permalink
Hello,

I wonder if anyone with experience can advise me. Event though I have been using C5 for 4 years I still cannot get my head around the File Structure.

Every time I need to go in an make a change it takes me hours to try and find the right php file because the File Structure seems alien to me.

For example - I want to put some Mailchimp code to connect my site to my Mailchimp Newsletter and need to add it just before the closing </head> tag - however in which file? and in which folder?

An explanation of the File Structure would be most welcome.

Fanflame
PS: I have put off upgrading to the latest version as this would confuse me even more as I think it would then run out of the Updates folder?

1 Attachment

Fanflame
 
mnakalay replied on at Permalink Reply
mnakalay
If it has to be in the <head> and it doesn't matter where in the head you should go to your dashboard page dashboard/system/seo/codes and there you can add code that will be added to the header.

If it must absolutely be just before </head> then you need to modify your theme.

Your theme is either installed by a package, in which case it will be in packages/your_package/themes/your_theme

There you will probably find a folder called "elements" or something like that. In It, you will probably find files with "header" in their name. Open them until you find the one that contains the </head> you're looking for.

Notice, my last paragraph includes the word "probably" several times. That's because this is how most theme builders do it but there's no guarantee. If you can't find that "elements" folder, just look in all the files in your theme directory until you find your </head>

Now if your theme was not installed by package then it will be inside application/themes

Hope this helps
Fanflame replied on at Permalink Reply 1 Attachment
Fanflame
Hi Mnakalay

Thanks for the answer I appreciate you writing. I actually installed the Stucco theme but even though I can find it I cannot find a php file in there with the <head> tags in.

I have looked in the places you suggested and had previously found them. I also tried looking at the SEO in the Dashboard but obviously my version 5.7.5.8 doesn't have the ability to add to the head. There is the ability to add to the HTAccess file and I had previously put some text in there when I built the site in 2016. I attach an image of what is in there.

I was hoping that somewhere there would be an explanation of the File Structure of Concrete5 from the developers but just can't find anything. Surely I am not the only person who finds the name convention of files odd.

Any further thoughts I would appreciate it.

Thanks again.

Fanflame
stewblack23 replied on at Permalink Reply
stewblack23
Here is a deeper explanation of the C5 file structure. This should get you on the right track. https://documentation.concrete5.org/developers/environment/directory...
Fanflame replied on at Permalink Reply
Fanflame
Brilliant, this is what i need thank you.
Fanflame