-
AuthorPosts
-
December 7, 2016 at 9:19 am #992859
Version 2.6.1
How do I assign a generic/default background image to all pages where none is assigned? There are parameters for default description and default title, but not for default image. I ccan’t expect all users to be able to configure this module when creating a new module.
How do I use the parameters to assign a default to a category…I thought something like this might work:
[Masshead option="com_content" view="category" id="13" title="E-SAFETY" background="images/banners/banner.jpg"] [/Masshead]
but it doesn’t.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 8, 2016 at 3:24 am #993071Hi,
By default, JA Masshead module only shows the title and description with all pages, if you want to show the background image maybe you need to add the page IDs need to appear with the background image.
You can refer the guide here and find 4. Use extra parameters step, it will help you out
If you could not solve this, you can provide me the URL of your site, admin login via private reply. I will check it for you
Regards
December 8, 2016 at 11:43 am #993187I know how to to add the page ID.
But that means every article has to have an entry in the module.
What about when users add a blog article from the front end?
How do I get a default image showing?
How can I use the parameters to assign an image to a category?
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 9, 2016 at 8:15 am #993343Hi,
This module does not support the background image by default. You can give me the URL of your site and admin login via private reply. I will try to help you to find the solution for you.
Regards
December 9, 2016 at 9:55 am #993374This reply has been marked as private.Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 12, 2016 at 1:23 am #993643Hi,
Actually this is the first time I’ve been asked for the default background image because when developing website, customers often have dynamic images for different pages.
At this moment, you can try to use module class suffix to define the default background image for module:
-
Create the new CSS class and add the image by default for this class
- Add it to Module Class Suffix of JA Masshead module
Hope it helps
Regards
December 15, 2016 at 1:02 pm #994856Hi – thanks .
So I’ve been playing around a little more….actually turned out simpler than I was making it…
[Masshead option="com_content" view="article" background="images/banners/banner.jpg"] [/Masshead]
So now to add some complexity back in…
Is there any way that the default title can be whatever the page title is?
So I don’t have to define a new masshead entry for each page when all I am doing is adding the page title?Thanks,
James
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 16, 2016 at 3:19 am #994968Hi,
You can add the title default into JA Masshead module with format
[Masshead option="com_content" view="article" title="Title default" background="images/banners/banner.jpg"][/Masshead]
Regards
December 16, 2016 at 11:08 am #995086That just literally displays "Title default" on the page, not the actual page title.
Ninja Lead ModeratorNinja Lead
- Join date:
- November 2014
- Posts:
- 16064
- Downloads:
- 310
- Uploads:
- 2864
- Thanks:
- 341
- Thanked:
- 3854 times in 3563 posts
December 19, 2016 at 1:51 am #995429Hi,
You can apply this way to add the title of JA Masshead module to title page of your site
Open modules/mod_jamasshead/tmpl/default.php file and add the code below as my screenshot: http://prntscr.com/dky0ef
$document= JFactory::getDocument(); $document->setTitle($masshead['title']);
Hope it helps
Regards
February 12, 2017 at 12:07 pm #1009772Sorry for the long delay in responding.
I have added this code as suggested in /modules/mod_jamasshead/tmpl/default.php
The file now looks like:
<?php
/**- JA Masshead Module for J25 & J34
- Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
- @license – GNU/GPL, http://www.gnu.org/licenses/gpl.html
- Author: J.O.O.M Solutions Co., Ltd
- Websites: http://www.joomlart.com – http://www.joomlancers.com
-
*/
defined(‘_JEXEC’) or die(‘Restricted access’);
$document= JFactory::getDocument();
$document->setTitle($masshead[‘title’]);
?>
<div class="jamasshead<?php echo $params->get(‘moduleclass_sfx’,”)?>">
<h3 class="jamasshead-title"><?php echo $masshead[‘title’]; ?>
<div class="jamasshead-description"><?php echo $masshead[‘description’]; ?>However, this still only displays the default title as configured in the Masshead module. It does not show the page title itself.
There has to be an easy way for this to show the page title automatically without having to create a new entry in the module every time.
-
AuthorPosts
This topic contains 11 replies, has 3 voices, and was last updated by Saguaros 7 years, 10 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum