Changing the position of Joomla 3.2 tags - joomla

I have added some tags and linked these to an article. On the front end the tags appear on top (i.e. before) the article text. Instead I would like to display them at the bottom (i.e. after) the article.
I assume I have to make an override of layouts/joomla/content/tags.php

Create a Template Override for the following file:
components/com_content/views/tmpl/default.php
Once done, open this file in your override location and go to line 157 and you will see the following:
<?php if ($params->get('show_tags', 1) && !empty($this->item->tags)) : ?>
<?php $this->item->tagLayout = new JLayoutFile('joomla.content.tags'); ?>
<?php echo $this->item->tagLayout->render($this->item->tags->itemTags); ?>
<?php endif; ?>
Move this section of code somewhere futher down in the file to suit your needs
Hope this helps

This can be easily achieved by simply changing the Position Of Article Info to "Below" in Options Tab in Joomla Menu. The Joomla menu has to be of Type "Article"
No need to create any override.
Hope this helps.
See attached screenshot.

Related

Joomla 3 category blog article override

Im trying to override the article layout for articles showing in the category blog layout. I have overriden the blog.php file from the folder components/com_content/views/category/tmpl into mytemplate/html/com_content/category, but this only overrides the category blog layout, not the layout of the actual articles.
The bit i need to override is the bit that loads inside here,
<article class="leading-<?php echo $leadingcount; ?><?php echo $item->state == 0 ? ' system-unpublished' : null; ?>" itemprop="blogPost" itemscope itemtype="http://schema.org/BlogPosting">
<?php
$this->item = & $item;
echo $this->loadTemplate('item');
?>
</article>
Any ideas how to do this without overriding every article on the site.
Thanks.
you should override this file:
components/com_content/views/category/tmpl/blog_item.php
Read More:
Customize Your Joomla Templates by Learning Overrides
You need to create another template over for the single article view. Place files to override from here:
components/com_content/views/articles/tmpl/
In here:
templates/myTemplate/html/com_content/article/
You can keep the names the same and every Article will use this template to render, or you can rename and manually assign the template to individual articles as needed.
Some links on the details on template overrides.
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
http://docs.joomla.org/Understanding_Output_Overrides
http://docs.joomla.org/Layout_Overrides_in_Joomla
Try to override the following tmpl files :"category/blog_item.php", "category/default_articles.php" and "article/default.php"

In which file Joomla 3.x generating the "edit article" links for authors Front End?

If you are allowed to edit the articles in Joomla, near the each article in the list, an "edit" button is present. How can I find, how that "edit" button generated? I just want to add some parameters. (I'm using a Front End for edit.)
It's in components/com_content/views/article/tmpl/default.php
<?php if ($canEdit) : ?>
<li class="edit-icon"> <?php echo JHtml::_('icon.edit', $this->item, $params); ?> </li>
<?php endif; ?>
You can override this in your template's html folder.
This script calls a function under components/com_content/helpers/icon.php to generate the icon.
You should not override this helper file. If you need to change what that function is doing, filter the content it generates after it has been run, whether via a plug-in or the default.php file.

display module only on the front page of virtuemart joomla 2.5

hi i want to display module only on the front page of virtuemart and dont want that module on inner pages. i have search about this, but did not get anything.
I tried to used this code but it does not effect.
<?php if (JRequest::getVar('view')=='productdetails') { ?>
<div id="productmod"><jdoc:include type="modules" name="productdetails" /></div>
<?php } ?>
Can anyone help me to figureout this problem
Thanks In advance..
take a look on the answer, and var_dump the $menuList to get all the menus, then just get the specific menu and apply your condition..
// Get default menu - JMenu object, look at JMenu api docs
$menu = JFactory::getApplication()->getMenu();
// Get menu items - array with menu items
$menuList = $menu->getMenu();
// Look through the menu structure, once you understand it
// do a loop and find the link that you need.
var_dump($menuList);
take a look on the give link how to determine the front or default page

Joomla 1.5: $this->countModules returns 1 for Jumi module even when empty

Working on a site in Joomla 1.5! Typically when testing if a module position is empty in Joomla! I'd do something like this:
<?php if ($this->countModules('position')): ?>
BEFORE
<jdoc:include type="modules" name="position" style="xhtml" />
AFTER
<?php endif; ?>
But in my case I have a jumi module that references external source of code.
In some situations it will be blank, which in that case, I don't want the BEFORE and AFTER bits showing either. But whenever I try running the above code, the before and after sections show up, because
$this->countModules() returns 1 instead of 0.
I have "Hide if empty" set to "Yes" for the module, but that doesn't seem to help.
I've even tried setting a return false; on the external source code but that doesn't seem to help either.
Does anybody have any suggestions?
Hide if empty cannot hide the BEFORE and AFTER because it's in the count condition.And BEFORE and AFTER will only hide if no module is enabled for that position. So to hide these you'll have to put this content inside your module.And check the if empty condition.
Let me know if it's not clear.

joomla without a component on the main page

On the page I edit modules constitute the main page. Actually there is no need for any component out there.
I can't remove jdoc from the template because other part of the site requires it.
I wonder what is the best solution for the problem: for main page I need one template but for others another.
As far I have worked with joomla internals almost never with back-end so I guess my knowledge lack in this department.
Any hint how to achieve that?
You can do something in your template like:
<?php
$menu = JSite::getMenu();
if ($menu->getActive() != $menu->getDefault()) : ?>
<jdoc:include type="component" />
<?php endif; ?>
Which will disable the component position when on the default [home] page

Resources