Editing notification messages in joomla - joomla

How do I increase the display time of on-screen notifications in joomla? E.g when a user registers. What file do I edit to achieve this?
The same question was also asked here:
https://forum.joomla.org/viewtopic.php?t=890658

I've achieved this by editing the following line on the default.php page in the layout of the template:
<?php if(count($app->getMessageQueue())) : ?>
<jdoc:include type="message" />
<?php endif; ?>
The above line neds to be changed to just <jdoc:include type="message" /> to ensure the system messages/notification stay permanently on the screen.

Related

Magento product overview and detail separated view

I want to handle the product overivew separataly to the product detail view. I want to add additional text right behind the price in the product deatil view.
I tried to edit the view.phtml in path app/design/frontend/mytheme/default/template/catalog/product/view.phtml, refreshed caches and so on, but nothing changed.
In catalog.xml view.phtml will be load. So its seems correct.
But even when I try to echo "test" it doesnt show anything.
<?php if ($_product->getShortDescription()):?>
<div class="short-description">
<div class="std"><h2><?php echo $this->__('Details:') ?></h2>
</div>
</div>
<?php echo "test";
endif;?>
Do you have any hint?
Regards
Matt
You should enable template path hints in the backend to check which template file is used to render product page. Make sure that the cache is also disabled.

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.

magento cms pages and checking if customer logged in

I have a CMS page that has a download link on it. Here is what I need to happen:
keep the download link if the user is logged in.
if the user isn't logged in, change the behavior of the link so it is a link to register.
I see that there is layout update xml i can use <customer_logged_in> and potentially change that link based on that. How can I use that layout update xml in this cms page so that the link is different?
Or is there a better approach that I could try?
The better approach is to go with your custom block creation. Here is how you can achieve what you want.
1) Create a CMS page and in content section include your custom block
For Ex:
{{block type="core/template" name="download_page" template="YourTemplateFolder/TemplateFileName.phtml"}}
2) Check if customer is logged in or not.
For Ex:
<?php if(!Mage::getSingleton('customer/session')->isLoggedIn()): ?> //If user is logged in
<?php $downloadUrl = 'Your Download URL'; ?> //generate your download URL
<div>
<?php echo $downloadUrl; ?> // Allow user to download
</div>
<?php else: ?>//If user is NOT logged in
<?php $registerUrl = 'Your Register URL'; ?> //generate your register URL
<div>
<?php echo $registerUrl; ?> // Ask user to Register
</div>
<?php endif; ?>

jdoc not rendering

I hope you can help.
I've a Joomla 2.5 site with an existing (and working) set of modules which are all showing up on the main site just fine.
For a whole myriad of reasons I've put together a custom Joomla template ... here is the out put: http://www.fabulous-women.co.uk/testing.html
in the "headerslice" position I've copied the working modules and set them to the headerslice position. However, it refuses to display.
<?php if ($this->countModules('headerslice' )) : ?>
<div id="headerslice">
<jdoc:include type="modules" name='headerslice'/>
</div>
<?php endif; ?>
The if statement does render the tags... but no content. The jdoc:include type="header" renders perfectly in the tags.
Help!
TIA
You need a space before the closing slash of the jdoc statement.
Try:
<jdoc:include type="modules" name='headerslice' />

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