I am trying to show Slideshow CK only on the homepage of my Joomla based site. I have gone into the 'assignment' section of the module and restricted it to 'Home' menu item and said 'no' to include on child items. This works fine. I only see the slideshow on my homepage. However, I have created a link to an article on one of my other menus. When that article is displayed, it shows the slideshow. I want to suppress it when it jumps to that link. I have been playing with various options but without much joy. I would appreciate it if somebody can clarify the control mechanism for selectively displaying the slideshow.
I have found a method of overcoming the problem but someone may suggest a better approach. I specifically went and excluded certain selected articles in the assignments. I had tried to exclude a 'hidden' category but that did not work for me. The downside of my approach is that every time I introduce a new article I have to exclude it.
If I understand correctly you are creating articles without menu items. Without a menu item you won't be able to control the module assignment so easily.
If you're comfortable editing your template an lternative approach would be to amend the template and load the module.
Locate the index.php file of your template. You should be able to do this via the template manager.
Create a custom module position e.g. slideshow-ck and assign the slideshow module only to the homepage.
Then in the template you would need to add some PHP as follows:
<?php
$menu = $app->getMenu();
$active = $menu->getActive();
if ($menu->getActive() == $menu->getDefault('en-GB')) && $this->countModules('slideshow-ck') ?>
<jdoc:include type="modules" name="slideshow-ck" style="html5" />
<?php endif; ?>
Basically what that does is only load the module position if it's assigned to the menu item AND the user is currently viewing the homepage.
https://docs.joomla.org/How_to_determine_if_the_user_is_viewing_the_front_page
Related
On all my Joomla pages I have the articles title as the h1 tag, so until now, Joomla has always displayed the title, i.e. what you see on the browser tab as the h1 tag. (There were one and the same thing).
However, this is not the case with all the pages that have no menu item linking to them, (they are linked to the rest of the site through another article). Here the name of my site is the page title.
How do I make the h1 tag the page title on these pages?
Try this,
This is happen due to those article pages meta options have title, Meta tag and keywords those are blank or not set yet. Then this case Joomla will read those info from your Global settings It may have your site name and Global description.
So the solution is set the Proper meta info for those articles from article manager.
If it is not practical then you can try it from article view or layout page Set meta data of Joomla page
Second Method is for setting the page title forcefully from scripts. It used for any components like here you have to check first method it will work for you..
Hope its Helps..
Problem solved! Here is how:
Make an override of com_content article and edit the default.php. Around lines 42/43 you should have the following code (the line number may not be exact as I have already taken out some code for a previous override):
<?php if ($params->get('show_title') || $params->get('show_author')) : ?>
Straight after that, add the following lines of code:
<?php $document=& JFactory::getDocument();
$document->setTitle( $this->item->title ); ?>
Ok all I want is hide the article title, no big deal, right?
So here is what I have:
Here are my settings in the article manager - i disabled pretty much everthing, and yes, i cleared cache:
Guess what, the title does not disappear. I am getting really tired of this bad quality.
I had the same problems with the tags, they wouldn't disappear. But you can just remove all tags you have in an article to make em disappear (great solution right)
Is it joomla or is it me?
I read a weird comment about having to disable author to disable the title here
During our testing, simply setting Show Title will not hide the title. You also need to set the option Show Author to hide as well.
That was in version 3.0
EDIT
I was debugging, and I saw this as implementation of C:\xampp\apps\joomla\htdocs\components\com_content\views\article\tmpl\default.php:
<?php if ($params->get('show_title') || $params->get('show_author')) : ?>
<div class="page-header">
<h2>
<?php if ($this->item->state == 0) : ?>
<span class="label label-warning"><?php echo JText::_('JUNPUBLISHED'); ?></span>
<?php endif; ?>
<?php if ($params->get('show_title')) : ?>
<?php if ($params->get('link_titles') && !empty($this->item->readmore_link)) : ?>
<?php echo $this->escape($this->item->title); ?>
<?php else : ?>
<?php echo $this->escape($this->item->title); ?>
<?php endif; ?>
<?php endif; ?>
</h2>
</div>
<?php endif; ?>
So a div and h2 is rendered in case author is available, should be empty when title is hidden though.
Show title is always 1, whatever I do, link_titles btw as well. The only way to disable it is going to the global configuration and setting the global configuration to Hide, whatever I am doing in the Article Manager Options tab of an article seems to have no effect (setting it to Hide, Show, Global). It seems to be fixed on 'Global'. At least with what I tested with
What I found is this (Joomla 3.2):
In Menu Manager -> Edit Menu Item -> Options
Set Show Title to Use Article Settings
In Article Manager - Edit Article -> Options
Set Show Title to Hide.
Worked for me.
Gert
You can 'control' the display of 'article titles' in three places
1 - Article Manager then 'options' button (top right). This will modify every article in your site, basically changes the default.
2 - Individual article, 'options' tab (center of page just above the editor). This will modify setting for this specific article AND it "overrides" the global article option setting.
3 - Menu item, 'options' tab (center of page just above the editor).This "overrides" the global article option settings and the article option setting.
I have just visited your question and the answers given.
If you just want to hide the titles of the articles you have assigned to the menu items in joomla 3.2, you do not need to hide them globally.
Instead there is a tab named Advanced Options in
Menu Manager: Edit Menu Item.
In which you will find
Article options => Show Title => Hide
By this way you can easily hide the title of the article which are linked to that menu item's link.
I wish this will be helpful to you.
I'm using Joomla 3.3, and to make the tÃtle "Home" dissapear on first page, I found the solution here by toskan:
Go to Menu Manager, edit menu Home, and on tab "Page Display" remove "Show Page Heading"
Why is it like this? So you can have the flexibility to change your display but also the simplicity to set your most commonly used settings in global configuration.
Global configuration sets the default display. You should set your globals to the most common settings that you will use in your site. Then you should only use individual article or menu settings when you want to override those settings. Really, most people never need to override becasue they want to have a consistent look and feel.
However, if you do want to have a mixture of settings the next step is to change individual items. For example on a given article you may have a date show even though by default you never show a date.
Still, what if sometimes you want to show the author but sometimes you don't? Do you have to copy the article completely to set new params? No, that would be ridiculous and a pain to maintain. In that case you create a menu item linking to that article. The menu link options can be used to override the options from the specific article. Again, you should really only be using this in special cases since you have already thoughtfully set your global and item level settings.
So the cascade is menu overrides item overrides global.
Joomla also gives you a lot of other options for this kind of thing such as you can even put an alternate layout. It could be (and is) a criticism that joomla goes too far in letting you customize everything so much and it creates an overwhelming UI, but on the other hand if you are used to it, it is very powerful.
hide website Title :
extension >> template Manager
Protostart
go to Options and tape a SPACE in TITLE
that will delete your Title and replace it by a space...TRICK that cant harm..
working 100%
maybe same for module or article title..
If you go to The Menu Item, then click on the tab "Link Type" it will ask "Add meny title:" set that to NO.
This worked for me.
edit: Check also the "Page Display" Tab
I may have found another solution. I am working on Joomla 2.5 though but maybe 3.2 may have similar settings. Took a bit to find but here goes. This applies if the Article has been associated as a menu item:
Go to Menu Manager then click the culprit menu item.
Then scroll down to "Page Display Options"
I would have attached an image for clarity, but alas I need 10 reputation.
For some reason though, this overrides the rules for Global Config and Article config to hide the article headings.
I hope this helps someone.
Update :
In Joomla 3.2 you can find this under the Page Display in the Menu Manager once you click into the Menu Item. By default headings are visible
Solution is simple.
If article is also a menu item you have to set it in settings for menu item, otherwise it wont work!
Well I don't understand, but the title is coming from the Menu Item. So there is the article title which you can show / hide / throw into the streets / dowhatever and nothing happens. Then there is the 'Global Configuration' for the articles, when I set the title to 'Hide' there, it will hide the actual thing , but yeah, for all articles.
Then there is the Menu Item manager which imho has no importance for the title displayed in the content. But okay, if you globally enable the article titles and then disable the menu item title for this menu item, it will actually hide the article title. You can still do whatever you want in the article options of the single article.
Probably the same accounts for show hiding tags of the ARTICLE.
It is good I don't have a gun in my place, I would probably have blasted my brains onto the next wall. Time spent for this crap: over 1 hour.
If someone can reasonably explain why it is like that, I will certainly accept or upvote.
Hi there I'm trying to display html code on certain pages in Joomla 3.0 depending on what category they're in - I've tried this but it won't work and displays nothing;
<?php $catid = JRequest::getInt('catid'); if ($catid == 14) {?>
HTML CODE GOES HERE
<?php } ?>
Any help would be greatly appreciated .
Rather than hardcoding this in to your site, just use Advance Module Manager and a Custom HTML module. This will make it trivial to change/add/delete what you want to display and where you want to display it.
First, create a menu item for each category if you don't already have one. If you do not want the links to show anywhere, create a new menu for the links and do not assign it to a module.
Next, install Advance Module Manager. For each category, create a new Custom HTML module with what you want to display. Then just assign the module to display for the menu item you created in the first step.
Yes. I want to override output of Category Blog component to 2 different display styles.
For first style, i copied and edited blog_item.php & blog.php in [mytemplate]/html folder. Then i choose template style from dropdown in backend of my category blog. That's worked. The display of category blog change as i expected.
But if i want to create another style and use in another category blog. How could i do ? And how to i named my files ( I tried blog_1.php, blog_item_1.php ) but only see my first style display in backend.
I'm using joomla 2.5.
Please help me. Thank you very much !
=================================================================================
[UPDATED]
I solved this issue. Here my solution:
Clone my template to [my_template_2]
Go to [my_template_2]/html/com_content/category then edit blog.php, blog_item.php as my needs.
Go to backend, at my category blog menuitem, i assigned [my_template_2] as its template style.
Then it worked. Both my category blog have its own style.
This maybe not very good solution because i have to use multiple templates, but at this time it's quite enough for me.
Thank you, stackoverflowers.
=================================================================================
[UPDATED 2]
Now, with multiple template styles, I could create unlimited styles for my category blog component within just only one template. That's very much better.
As you may know, joomla doesn't let developers make different styles for its components.
I think you have to list all menus which are made by "category blog component" in template managing page and let users set each menu style at there.**
and at blog.php, check template setting and then load customized style...
** you have to develop a custom field element which list all "category blog component" menus.
* you can use this code to accessing template parameters in component's template :
$app =& JFactory::getApplication();
$template = $app->getTemplate(true);
$paramsTemplate = $template->params;
$style = $paramsTemplate->get('style');
You don't need to use multiple styles. What you need is to use alternate layouts and alternative menu layouts.
For alternative menu layouts in the html/componentname/category folder of your template make a new style with a unique set of names similar to the way blog already provides an alternative to category list in the article category layout folder. Also make a new xml file for each layout that you make, with a matching name.
When you create your menu item you will now get these alternatives along with your other normal choices. Just select the one you want.
Based on the learnings above here is my code for the /templates/mytheme/com_content/category/blog.php
And then in the Global Configuration > Article Manager Options > Category choose Blog as the override/ layout.
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers');
$pageclass_sfx = trim($this->pageclass_sfx);
// so pick it on the page class in menu item
if (isset($pageclass_sfx) && $pageclass_sfx != '') {
echo $this->loadTemplate($pageclass_sfx);
} else {
echo $this->loadTemplate('default');
}
I can add multiple elseif if something else is needed, or it will look for 'blog_' . $this->pageclass_sfx . 'php'. It is always beginning blog_ as thats coded into the com_content. The old blog i moved to blog_default.php and blog_default_item.php
I am new in joomla and I am going to develop a web site with joomla 1.5.
For the site I have a html css template. Now I want to convert this into joomla template with different files (Header,Footer, sidebar etc).
Is it possible? if yes then how can i do this ?
and how can i make different page temples for my different page (such as about, Products etc)
Please help me....
I would recommend starting here:
http://docs.joomla.org/Creating_a_basic_Joomla!_template
http://docs.joomla.org/JDOC:Joomla!_1.5_Template_Tutorials_Project
I would also recommend visiting http://demo.yootheme.com or http://demo.rockettheme.com and finding one of their free templates (both have one or two, I believe) to download. That way you can analyze how a professional template is built and organized and apply it to your own project.
Your last question: To make different templates to apply to different pages. The simplest way is to follow the directions (above) to make/modify/install a second template. Then use the Joomla template manager and specify which pages apply to which template.
You can certainly create different files for each portion of a page but it's really not necessary in Joomla. There is only one "page" in Joomla, the index.php file. The entire website is built using that file. You can control the different parts - called positions in Joomla - of the website through 3 different methods
using conditional statements that determine whether they need to display at all
using modules to place content in the various positions
using CSS to control the display of each module
While it is technically possible to use multiple template in Joomla, it is almost always unnecessary. In the menu items used to create the pages in Joomla, you can specify a parameter called the page class suffix. You can insert this in to the body tag of your template giving you complete control of each page in the website through CSS rather than coding another template. Use this code to add the page class suffix to your body tag -
<?php
$menu = &JSite::getMenu();
$active = $menu->getActive();
$pageclass = "";
if (is_object( $active )) :
$params = new JParameter( $active->params );
$pageclass = $params->get( 'pageclass_sfx' );
endif;
?>
<body id="<?php echo $pageclass ? $pageclass : 'default'; ?>">
This is compatible with all the big frameworks as well.
If you want to show different header footer and sidebar on each pages. It can be easily possible in joomla. You have to simple create custom module in joomla and you control the display option of this module from the joomla administrator.