You're going to want to use JInput for this.
$jinput = JFactory::getApplication()->input;
$option = $jinput->getCmd('option'); // This gets the component
$view = $jinput->getCmd('view'); // This gets the view
$layout = $jinput->getCmd('layout'); // This gets the view's layout
if ($option == 'com_content' && $view == 'category' &...
After doing some research, it turns out that the third party component I am using doesn't have a file created as ..\components\com_thirdparty\helpers\category.php which is required to implement a class ThirdPartyCategories which extends JCategories in the component's helpers directory as described below
defined('_JEXEC') or die;
* ThirdParty ...
It is best to not think of Joomla as "creating these links" and instead recognizing that there are a variety of urls that Joomla can understand and load a page from.
The non-sef url represents the variables that any SEF url gets translated into. The only piece that is missing from your url would be an Itemid which corresponds to the menu item id.
I haven't ...
You can just duplicate your blog.php override and rename it (e.g. shop.php). At that point it will be available as an alternative layout for Category Blog. You can also add child layouts, like shop_item.php and then reference these from shop.php so you can style each item rendered in the category view.
Yes, you can add custom fields to the com_content (category? I assume you intend component?):
You can add a plugin as described here and then, simply via xml add the fields you desire, ...
As @Sasi varna kumar showed with the screenshot in his answer, what you need to adjust is what articles should be shown in your blog layout.
The settings you were adjusting are about showing categories and subcategories, which (the categories) can be considered as an independent content entity. Showing categories's data, like category's and subcategories' ...
Yes it will.
Instead go to:
Click the tick box to tick all article.
Then click 'Batch' up the top.
To Move or Copy your selection please select a Category.
Select your new category, make sure 'Move' is selected and then click Process.
This will do it all for you and update the relevant category ...
You can achieve this with the built in functionality of Joomla.
Create a Category Blog Menu Item and deactivate title under the options tab.
While creating an article, write first your fake title and maybe a short intro text.
Then use the "read more" button on the bottom of the editor to insert the read more button (displayed as line in the editor).
your supposition that articles in that category are still publicly viewable isn't true.
Unpublishing a category, makes the articles in that category unavailable for viewing to site visitors/users.
Even unpublishing a parent category automatically makes the articles in its child categories unavailable for viewing.
That is because you haven't created the appropriate CSS support for 3 columns in your template.
For example, at the home page (or whatever it is this page: www.scottiev.com/R ), if you want to show the 3 blocks in a 3 column fashion, then you need to add something like the following css rules in your template's css file.
This post highlights a common problem with Joomla and other CMSes. Without the correct setup many different URLs can be indexed for the same page.
Joomla applies an ID for each category and each item. For auto-generated links, all Joomla processes are these IDs (ie. /236-category-name/121-article-name) - the additional category names and article names are ...
To add a special "category" class to the articles of the featured articles menu item, you need to create a template override.
Simply, copy the : default.php file, located in:
Create any of the above folders (html, com_content, featured) if they don't ...
First of all, Joomla 2.5 is not supported anymore. If you're just getting started with Joomla, I highly recommend you begin with Joomla 3.
when I deleted [..the uncategorized category..], I couldn't see my web page anymore, there was error.
You can delete the Uncategorized category, but you'll need at least one category for your site to work properly. ...
Check to see if you have your SEF URLs turned on and configuration correct. By default you should be able to access the URLs you listed, that is the default Joomla routing kicking in. 2-uncategorised is actually the category_id-category_name in the Joomla database. The default router uses these 2 pieces of info to create the url. Are you running any kind of ...
In #__categories table ordering field is named as lft. So, this column saves the ordering of the categories.
If you want to look more into code side then you can see:
And check the function populateState(), there ordering is defined.
In your query, you just need to add an order by clause and ...
We have encountered the exact same issue, and it turned out to be indeed, a corruption in the #__categories and in the #__assets table where the entries for certain categories pointed to the wrong assets (these categories didn't have asset entries in the #__assets table in the first place). Fixing this consists of recreating the asset entry for the category ...
You can ask via SQL. It should be something like
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->where($db->quoteName('catid')." = 13";
// Reset the query using our newly populated query object.
$count = $db->loadResult();
I found the answer.
There is another file controling the frontpage blog.
After deleting if ($params->get('show_readmore') in components/com_content/views/featured/tmpl/default_item.php too I got the result I hoped for.
It's not very clear what you are trying to do.
This module can display articles from many categories and also works in various modes.
In the case of multiple categories, what is the one that you will display as heading?
At the other hand, there is no such thing as $list->displayCategoryLink;
Anyway, in the case you show articles from 1 only category, ...
There's a very easy way. In menu manager it's possible to assign custom css classes to a menu item. In Protostar this page class will be applied directly to the component container, in this case <div class="blog">, which will allow you to style the entire blog output with your custom css.
Now you can add your styles using the page class to provide the ...
You have a few options, you can duplicate your current template and rename it. Then you can alter the css and add extra classes as required, then assign this template to your desired category pages. You can find some help on how to do this here.
The easiest option (in my opinion) would be to use a different template for the category sections. Providing you ...
The best way for make your own version is making an override.
First, here some docs for make the override step by step: https://docs.joomla.org/J3.x:How_to_use_the_Template_Manager
Now you need create an override in the column:
Components > com_content > category
You can find the files in:
You should implement the similar check as done for categories in CMS content plugin.
// See if this category has any content items
$table = '#__table_name';
$count = $this->countItemsInCategory($table, $data->get('id'));
// Show error if items are found in the category
if ($count > 0)
$msg = JText::sprintf('...
The permissions to create and edit in category "Informatique et SIG" for user group "fiche_pratique_DSI_agents" are set to "inherit". They should inherit from the parent category "Mon service" and therefore should be "not allowed".
Maybe something with your #__assets table is wrong.
Before you do anything else, make a backup of your database.
Then I ...
I solved the problem by using ACL Manager fix assets feature plus few manual steps. The problem was that there were duplicate categories with same name and same alias were created at the time of Joomla update as a child element of the main category plus assets table was broken. Following are the steps which I took:
Changed the alias and deleted the ...
If you link to an article using the WYSIWYG editor's button then it creates a link with a structure such as the following:
That Itemid tells the router what menu item to base the page's layout on - what modules to assign etc. ...
I did not remember how to get the parent category of article item, but to get the tags for current category you can try to use this code:
$categoryTags = new JHelperTags;
<?php echo JLayoutHelper::render('joomla.content.tags', $categoryTags->itemTags); ?>