By Colin Berr on Friday, 15 August 2014
Posted in Technical Issues
Replies 7
Likes 0
Views 746
Votes 0
Hey guys,

My idea: I want to create sth. like a magazine portal on the blog's frontpage, with a lot of modules over the whole width – and when someone clicks on an article, he sees totally different (= less) modules, pref. only sidebar modules.

How can I do that?

I want to have one module combination for every blog post, and one on the blog frontpage. And maybe some more for the specific layouts (for example the Archive Layout / View etc.).

Thanks
Colin
Hello Colin,

I don't think you can / should do this within the component. Instead, it should really be done on your template level instead. EasyBlog is not designed to just display "modules" only. It's the responsibility of the template to determine what modules shows up on which page
·
Saturday, 16 August 2014 00:57
·
0 Likes
·
0 Votes
·
0 Comments
·
Ok, I know it's about the template level…

My question is: Which (hidden) link do I have to create if I want to assign modules to the Single Article Layout / View only?
Or if I want to specify the module assignments for any Category Layout / View at once, shall I just link to "an exemplary category" and specify the module assignments for that link – and then that's it? That approach doesn't seem to work.

I want to show specific modules only (!) on the (and every) "single entry/article view", which can look the same for any article we create.
And on the frontpage (and again ONLY there!) I want to add some more modules (above the articles listing).
·
Saturday, 16 August 2014 08:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Colin,

You need to add your necessary codes in the template itself. You can create any views for the frontpage (Preferably Joomla's articles). Then, in your template, determine if the current request is made on the front page and if it is on the frontpage, load the module positions that you want.
·
Saturday, 16 August 2014 15:05
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

I finally found the MetaMod module, which helps me solving the problem.

To show a specific module (here module-ID 461) only on the Blog frontpage, I started with the following PHP query:

if (
$option == 'com_easyblog'
and $view == 'latest'
and $Itemid == '296'
) return 461;

My question is now: What do I have to enter to see the specific module ONLY on the VERY FIRST PAGE of our EasyBlog frontpage?

When the user clicks on "next page" (…/blog?start=10 or whatever) the module shall not be shown anymore.
·
Wednesday, 27 August 2014 18:41
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Colin,

You probably want to use a code that looks like,

if (
$option == 'com_easyblog'
and $view == 'latest'
and $Itemid == '296'
and JRequest::getVar('limit', '') == ''
) return 461;
·
Wednesday, 27 August 2014 22:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Yeah! Almost!

if (
$option == 'com_easyblog'
and $view == 'latest'
and $Itemid == '296'
and JRequest::getVar('limitstart', 0) == '0'
) return 461;

This way it works. Thanks so far!

Any ideas how to improve that solution even further? (for us and others)
·
Saturday, 30 August 2014 03:36
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Colin,

Not really sure if there is any other way around this but if it's your Joomla template that is rendering those items, then it needs to be tweaked within your template.
·
Saturday, 30 August 2014 15:39
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post