Explanation regarding Contao Development - xampp

I need help regarding this issue.
I'am new to Contao, and coming from Wordpress, where the file structure (folder) is quite different, I'm having troubling of where to put the front-end files (HTML) and how to work with the Contao back-end. I'm on the way of reading the official documentation, but would really need another explanation, something like Wordpress-wise. Just so I know what files goes where and how to work around with them. Like where to put the header file, the footer file etc.
Just some explanation so I get what is goin' on and start doing it.
Thanks in advance!

It really depends on what you want to do. For example, there is no "header" or "footer" file. There is a general template for the front end called fe_page, which you can customize. But other than that, the contents of the header and footer for example can be defined in the so called page layout of the theme you configured.
Unfortunately the official manual is still in the process of being translated to English.

Related

How to link one file of code to another file of code or do i have to copy and paste that code on that file of code?

Hi I am fairly new to coding and I am designing a webpage/app. I am basically trying to figure out how to link one file to another file of code. I have one file with some code that has my page design but I designed a hamburger drop down menu in another file. My question is can I just link that file to my home page file or do I have to re-code it on that page and every page after that?Picture of code and files
You seem to be writing a HTML file. The traditional way to solve what you are looking for, is to bring another language into the mix, such as PHP, Ruby, Python, etc.
These languages need to run on a server. Instead of writing HTML directly, these languages write HTML on the fly for you.
Because of this feature, you can make re-usable parts of HTML and use them in multiple pages.
The switch to server-side programming languages is definitely a step up in complexity from HTML, but it's worth learning if this is your goal.

Conditionally include separate manifest files with asset-pipeline on Laravel 4

I have installed CodeSleeve asset-pipeline to manage and minify assets for my project. As I understood, all the scripts and stylesheets are controlled from manifest files located at: app/assets/stylesheets/application.css and app/assets/javascripts/application.js
That is all great, but what if I want to load different assets for different page? For example admin side of the application.
This situation is also mentioned in asset-pipeline documentation and recommended to use separate manifest files.
For example, if your application is silo'ed into admin section and user section then it probably makes sense to have a separate manifest file for each section.
Sounds great, but question remains. How?
Here is a similar question about asset-pipeline on Rails 3.1 and a somewhat complicated solution for such a obvious need, as is the need to include different assets in different sections of the application.
I still tried to make sense of that solution, but this is about Rails, so I still have no idea where are the manfiest files added in Laravel version?
I must admit I first went much longer and complex path, hacking the config array with Laravel Event listener. Got it working though until I turned on production environment, which broke my admin section styles. Now after all the hair-pulling came back to asset-pipeline documentation and found the very simple solution which had been right in front of my eyes the whole time: All you have to do is add parameter to include tag, like this:
<?= javascript_include_tag('admin/application') ?>
This will point to folder assets/admin and look for application.js from that folder. Resulting html markup will be:
<script src="assets/admin/application.js" data-foo="bar"></script>
Same thing with stylesheets.

List contents of ZIP file using ZipKit

I need to get list contents of ZIP file using ZipKit framework. The content I want to present in NSTableView. So, ideally I need to get NS(Mutable)Array. Is there a simple way how to do this ?
Thanks a lot, Petr
To be honest I think that you should use Zipzap for working with zip files. It's a very good library. I've used it and I don't have anything bad to say about it.
Take a look at the github page and there's some example snippets for you to test out.

Magento - adding getChildHtml() to existing template as part of module

When creating a module to extend magento its great to be able to package everything up in a self contained, well, module, and simple add it to a site by dragging it in to the root directory.
I have one problem though, what happens when you create a module and need to add something to output in an existing template file say catalog/product/view.phtml for example.
This is fine when you are in full control of the code and have easy access to it, you simply use a layout update in your modules config file, add the necessary code the your modules layout file and then call getChildHtml in the desired template.
But, I am creating a module that collegues will be using, now and in the future and it would be good to have a way where they dont have that final step of having to manually edit the template file.
How do you get around this instead of completely replacing the template file as part of your module?
David,
Though I haven't tried it yet myself, Inchoo is a fantastic resource, and they posted this article earlier this year and it looks quite intriguing and could potentially do what you want to do without needing any template files: http://inchoo.net/ecommerce/magento/how-you-could-build-your-magento-extensions-without-view-files/
Otherwise, there's no really nice way to do it (that I know about at least). You need to do as you said and create your own layout xml file, and override the template with your own.

What is the file contents.css in CKeditor?

CKeditor's installation instructions tell me to just unzip the whole distribution file on my webserver's production directory. But it is full of files I definitely don't want there, like source code, examples, and even server-side code in PHP. I got rid of most of these files but there is one I'm not sure about: contents.css.
I can see this file uses a lot of styles I definitely don't want to see in my site. My question is:
Is contents.css required by CKeditor, or used by default? Do I even need this file on my production site?
I suppose it depends on what you're using in CKeditor, or what you plan to use later. Personally, I'd suggest renaming the file (something like) contents.css.old and creating a new contents.css file, copy across all the styles that you think you'll need and then destruct-test your implementation of CKeditor, to assess whether you've got all the styles that you need.
Add to, or remove from, that file to get your finished version and then use that one. I'd strongly advise keeping the original version around though, for future development purposes.
To your specific questions, though:
Is contents.css required by CKeditor, or used by default?
I believe so.
Do I even need this file on my production site?
Not so far as I know, its absence will likely cause things to look a little less-pretty, though, until you apply your own styles.
As suggested, above, though, I'd rename the original and then create your own stylesheet with the same name, it's rather easier than going through all the various js files looking for, and changing as appropriate, references to contents.css.

Resources