Module positioning issue

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
hsarora
Sun Sep 28, 2014 8:14 pm
Reply with quote
Report this post
Hi,

I have few issues with News 2 Joomla 3.x

1. article_inset: I have assigned a module for this position for joomla articles but it only shows blank space, no content at all. (although, I tested on inset position only that seems to work but not article_inset)

2. I have module (news show pro gk5) to position just after single article finishes (after Prev and Next buttons). I have enabled comments (komento component) due to this, module goes at the bottom of the page after Comments. I would like to position just below Prev - Next buttons, above comments. mainbody_bottom or mainbody positions have no impact on its positioning. Module goes well at the bottom of the page.

2a). I would like to display this module only under Single article page. At the moment it displays under Blog/Category layout as well. How do I only make it possible to view on Single article page for specific Menu item?

Thanks
User avatar

GK User
Mon Sep 29, 2014 6:21 am
Reply with quote
Report this post
1. There is no such module position:
http://demo.gavick.com/joomla25/news2/i ... -positions
2. Yes - because an article block contains article itself, any kind of navigation and comments. You would need to create a custom module position to be able do insert anything in between.
2a. Without some 3rd party extension or custom coding - it might be impossible.
User avatar
Moderator

hsarora
Mon Sep 29, 2014 9:45 am
Reply with quote
Report this post
Hi,

Thanks for the response.

1. There is module position available in the list which says article_inset! it is also in template.xml! what is purpose of it? it does seems to create such position and space with in article but no module loads?

2. How do I create custom module position?

3. If you could suggest something that would be great! other wise I'll find some way around!

Thanks
User avatar

GK User
Wed Oct 01, 2014 3:19 pm
Reply with quote
Report this post
1. This is a good question. It is true that when a module is published in that position there is a layout css change generated, but module content itself isn't used anywhere. I'll forward that question to our devteam.
2. https://www.gavick.com/documentation/jo ... -position/
3. Sorry, but I don't know such solution :(.
User avatar
Moderator

hsarora
Wed Oct 01, 2014 3:58 pm
Reply with quote
Report this post
Thanks for the update

1. Please keep me updated for the article_inset position. It is quiet a handy module position :)

2. Bravo!! this will surely help.

3. Smile :D I found the solution!
User avatar

hsarora
Wed Oct 01, 2014 7:12 pm
Reply with quote
Report this post
Hi Again!

I have a issue in module positioning. I followed the page instructions and at last step to call module, page ends with error.

I need to load module with in article. So I went to gk_news2 -> html -> com_content -> article -> default.php

When I entered this
=================================================
<?php if($this->API->modules('article_bottom')) : ?>
<section id="gkMainbodyBottom">
<jdoc:include type="modules" name="article_bottom" style="<?php echo $this->module_styles['article_bottom']; ?>" />
</section>
<?php endif; ?>
=================================================

Browser shows the following errors:

1. Undefined property: ContentViewArticle::$API in \templates\gk_news2\html\com_content\article\default.php on line 311
2. Fatal error: Call to a member function modules() on a non-object in templates\gk_news2\html\com_content\article\default.php on line 311


This means Object and Property not called in article- > default.php

Could you help me to work this out please?

Thanks

PS: Please don't say that you can't help!
User avatar

GK User
Sat Oct 04, 2014 11:43 am
Reply with quote
Report this post
It seems Joomla doesn't allow to place a module inside of article template. I'll ask more advanced deveopers if it is anyhow possible.
User avatar
Moderator

GK User
Sat Oct 04, 2014 2:26 pm
Reply with quote
Report this post
For sure you can't get modules inside of an article template this way, but you can do something like that:
Code: Select all
        <?php
            $modules =& JModuleHelper::getModules('module_position_name');
            foreach ($modules as $module) {
                echo JModuleHelper::renderModule($module);
            }
        ?>

It creates $module object basing on module_position_name and prints out all the modules assigned to module_posiiton_name.
User avatar
Moderator

hsarora
Sat Oct 04, 2014 4:13 pm
Reply with quote
Report this post
Lovely!!

You are a life saver..

Many many thanks!!
User avatar

GK User
Mon Oct 06, 2014 6:58 pm
Reply with quote
Report this post
No problem.
Is there anything else I can help you with regarding this topic?
User avatar
Moderator

hsarora
Tue Oct 07, 2014 9:35 pm
Reply with quote
Report this post
Yes, One more thing is it possible to output Module Title within this code? At the moment when switch to Show title, it doesn't show . Only module shows up.


Another question, not related to this topic. Is it possible to display joomla articles additional links (Link A, Link B, Link C - under Images and Links) to display in News show Pro module?

I have tried display_links.php from template/html/article/default_links.php but no success. Any input would be valuable.

Thanks
User avatar

GK User
Wed Oct 08, 2014 8:58 pm
Reply with quote
Report this post
1. Please check if setting additional atributes helps:
http://docs.joomla.org/JModuleHelper/renderModule
2. Please create new forum thread for that question, it will help keep the thread clean and readable.
User avatar
Moderator

hsarora
Wed Oct 08, 2014 10:56 pm
Reply with quote
Report this post
Hi,

Thanks for the update. I already found that answer from joomla docs. Following snippet will output Module title

Code: Select all
<?php
  if ($module->showtitle)
  {
    echo $module->title;
  }
?>
User avatar

GK User
Thu Oct 09, 2014 7:15 pm
Reply with quote
Report this post
Oh, even better idea :).
Thanks for posting it.
User avatar
Moderator


cron