Understanding Joomla Structure - php

I am new to Joomla and can't help but notice the difficulty in understanding page structure.
Right now the website has a page for example: domain.com/index.php/aboutustab
So it seems index.php is required to render all pages and the "aboutustab" seems to be an article but i can't find where the content in the aboutustab is being pulled from and how?
I looked into Article manager but the content is not there.
By content i mean all the text that is suppose to show up and etc.

You should start by reading everything in the beginners section of the Joomla docs located here.
What you're seeing is a menu option, not an article. Read the docs, they really do help.

In Joomla 1.6/7/2.5 the index.php is shown if you haven't enabled Joomla! "Search Engine Friendly URLs" option in the SEO Settings panel in the Site tab of the Global Preferences.
In conjunction with using the "Use URL rewriting" (which requires you to enable either the Joomla! .htaccess file on Apache servers or the web.config file on IIS7 servers) these settings remove the index.php from the browsers location bar. Joomla! still passes everything through the index.php but it's not visible to the end user.
The content you're seeing would typically be in an Article but it may not have the same title as that displayed on the website - the title can be over-ridden in several places. The other possibility is that it's in a Custom HTML module, which is essentially a mini article that you can place in module positions.
As for page structures, they are controlled by the active template (a template is a set of php, css, js and image files in a directory, usually of the same name as the template). A template typically provide a core content location (called the component area) and a variety of module positions. Most Joomla! templates support a variety of standard module positions including top, header, footer, copyright, user1...user5 etc.
The page is assembled by pulling together all of these elements (articles, modules, etc) and inserting them into the template.
HTH
Craig

Related

How can I find the file some element is loaded from?

I manage a website which is based on Drupal CMS. I have FTP access and I want to modify the structure of the header.
I know that the header is loaded from separated php file but I don't know what is the path to the file and how to find it in FTP.
Is there any way in Chrome dev tools to find the path to the file and is there a general way to find the files from which some part is loaded?
Check under "Appearance" from admin menu what theme is used and download whole theme over FTP. Themes should be in sites/all/themes dir. Then search the theme files and change what you need.
I don't think that browser can be aware of theme structure since it receives the whole pages and it can not know how page html is built on server side. There is an drupal module called Theme developer which can help you with that:
https://www.drupal.org/project/devel_themer
Unfortunately it exists only for Drupal 6 & Drupal 7 - not sure what version of drupal uses your site.

Where are the templates for the default pages in Silverstripe 4?

Where are the templates for the default pages (Home, About Us, Contact Us) in Silverstripe 4 when freshly installed? The documentation does not say where.
They're called Page.ss and Layout/Page.ss, and will be located in whichever theme you've installed. If you don't have any themes yet then there won't be any yet.
If you don't have any themes it will use templates/SilverStripe/Control/Controller.ss.
Bonus: you can enable SSViewer.source_file_comments via YAML configuration to have HTML comments added to the rendered page source code, showing which templates are being used.

Magento custom category widget not appearing on stage server

I followed this (first comment),
magento - category name and image in static block? to create a simple widget to display the category image and title from a static block on a CMS page. It works fine on my local MAMP version of Magento Enterprise 1.13.0.2. It's not working however on the stage / test environment Magento 1.13.1.0. (ubuntu).
It doesn't error, it's as though it's ignoring the template file (info.phtml). When I reverted to the default theme I realised I had to copy the template files to the default enterprise folder to get it to work but it did (local version). I have made sure that the template folders are in each of the themes, base, enterprise (default), MyTheme (default (which is enterprise default) & (MyTheme / MyThemeVariant)).
The only setting / configuration that appears to be different between the local and the stage is that pretty url's aren't working on the local. I have looked into the htaccess and it still isn't resolved. On both versions the native Category link Widget isn't working but i'm not sure if that is relevant.
I have disabled any extensions turned the cache off and cleared the index. Still nothing.
I have been looking for the answer, retracing my steps, altering and changing back any setting(s) I think may be relevant for 3 days now so i'm well stuck. Anything anyone can offer to try I will give it a go.
So in Magento Enterprise there is also a full page cache that you can access via the Magento Admin here : System->Configuration->System->advanced->External full page cache settings.
On the page System->Cache management, as well as disabling all the caches you should flush the Magento Cache and the Cache Storage.
You might have a 'cache' called Redis or APC, but I don't think that affects .phtml output. and if you can access the Widget in the back end I don;t think those items are the problem.
Your webserver might have a full page cache such as Varnish but I don't know how to use it or turn it on or off.
Theoretically your webserver headers might be saying 'this page doesn't update so internet providers can store local copies in their caches' - but I would be astonished if that was the case (inspect your header and inspect the Cache-control Expires and Last-modifed headers if you want to eliminate this possibility).
Your browser might have it's own little cache (which you can clear from your browser settings).
If it isn't a cache problem, in my experience .phtml files get skipped if they have PHP errors in them but you have it working on your local dev server. Could it be a file permission issue? Could it be a setting in the widget on your server that is not handled by your widgets .phtml? As alast resort, try changing your widget .phtml to a really simple file like <?php echo('test PHP output'); ?> and see if that renders - try putting the widget on different pages (ie new pages that won't be cached anywhere) and see if that get's everything through.
Could you have a namespace conflict with another module? Eg an XML file is changing your widget block XML name that sets the .phtml template? Does your widget.xml file declare <supported_blocks>...</supported_blocks> which might be excluding the block into which you are trying to render the widget?
What else? You mentioned this widget displays category information: Are you referring to a category that exists on your staging server? It will probably have a different category ID than your dev server and / or check the category is visible in the website and store.
Okay, I think I am out of ideas now.
The problem was that "Block" php file's first letter was lowercase. I changed it from info.php to Info.php and now everything works as expected.
This has been the single most frustrating investigation yet into Magento. The only thing I hope is that it saves someone a whole load of pain.

How to integrate a wordpress site with Joomla 3.0

I have an established wordpress with a members section and forum, the whole site is being redeveloped but with Joomla 3.0, A lot of the content will have to be just copied and pasted into the new site but the owner of the site wants to keep the old wordpress site up for a while and possible blend it into the newer joomla site with css and styling.
I've tried throwing one site on top of the other and the only two files that collide are the license.txt (that I won't worry about)and the index.php file.
Both sites will work fine if its their index.php but if it's wordpress's index.php the links on joomla will give an error, and if it's Joomla's index.php, any wordpress links will go to the joomla index page.
What is the best way to engineer this to the main index.php will be Joomla ?
Here is the wordpress index.php
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* #package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* #var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php')
Thanks
1st thing I want to mention here is having two separate cmss' in a directory is a bad idea. If had searched a bit on google you would find this helpful.
JConverter
As the name suggests, JConverter allows you to convert your WordPress
blog into a Joomla site. It can import users, blog posts, categories,
pages and even links from your WordPress blog to Joomla.
If you are not sure about the quality you can start reading the comments.
Advice
have a separate folder for two cmss and use a .htacess file to get the job done. You can find tons of articles explaining how it should be done.
After thinking about it here are the options I think I have
Option 1)
Both Wordpress and and Joomla can coexist on the same root folder, the only files where there is a conflict would be the index.php (and some license text file) and this could be engineered in such a way to work, but having 2 content management systems on the same domain root isn't a great idea in the long term as the root domain has loads of files there and updates and security patches in the future, it's open to something going wrong.
Option 2)
Put the new Joomla site on the root and then move the older site into another folder then use apache rewrite and an .htaccess file that would rewrite the location of the word press files and thus keep the original links
Option 3)
There is a component of Joomla called wordpress for Joomla which makes Wordpress a part of Joomla and would keep all the links of the original, But it's designed for people who have a Joomla site and want a dedicated blogging tool like Wordpress, not the other way round. I was talking to the developers and there unsure if this would work the other way round and then there's plugins ect to think about.
Option 4)
Leave the the current wordpress site in the same position and upload the new site to a new folder called /en/ (As in an english version)
Option 5)
JConverter still only in beta
I'm going with option 4:)
Why would you keep both sites? That just means duplicate content and is going to stop the new version of the site from ranking. The best option in my opinion is ditching your old site and making sure the URL either are the same (which can be achieved with a SEF component such as sh404sef) or use 301 redirects to your new URLs which will tell Google the URL has permanently changed.

Joomla 2.5 views - php vs html suffix

I'm looking at a site under development (at my wife's work). It's being built with Joomla 2.5.x, and it's using a Kunena template for the forum.
Each page on the site uses a single URL with PHP variables, e.g. www.sitename.com/index?option=com_content&view=article&id=96&Itemid=101.
However, on the demo site, the suffix is always .html even though the content is CMS/database-generated.
What I want to know is:
Why does the site at my wife's work use .php?...?
Where in the backend administration portal (to which I have access) are the settings for each view (presumably using a MVC framework)? Or are they only available by editing the PHP files directly?
Thanks.
Addendum
I found this documentation which helps explain #1. Still would like an answer to #2.
First, you should never edit a Joomla file directly. If there is ever somethign you can't do via a setting, override the file. Any changes you make in core files, besides potentially breaking things, will get overwritten on an update.
In terms of settings in general every view has an options button and you set default settings for the component there. There are then in general individual settings in items and menu items that override the defaults.
Kunena has more complex configuration and thus has its own complete UI.
Joomla has a setting for using either the raw url (which your site is using) or "Search engine friendly" (SEF) urls. The demo site not only uses SEF urls but also adds an html suffix to the end. The html really means nothing to the system and is just there. You could turn that off and the system would operate the same just without '.html'. (Locations would look like folders instead of files, I guess.)
If you access your administration system (www.sitename.com/administrator, most likely), you can go to Site->Global Configuration. Make sure you are on the "Site" tab and you should see SEO settings on the right side. These settings will change the urls between the demo's version and your own.
To use the mod_rewrite bit, you may have to convert an htaccess.txt file to .htaccess on the server: http://docs.joomla.org/How_do_you_convert_an_htaccess.txt_file_into_a_.htaccess_file%3F
To add a bit more, the demo site's url is ultimately converted back into the url that you see on your wife's work's site. The system operates based on option, view, id, and Itemid variables. The SEO settings convert this into search engine friendly phrases which I think help both search engines and people!

Categories