- Posts: 4
- Thank you received: 0
Module appearing on articles?
-
vintage-threads
Inactive member - Topic Author
- New Member
Less
More
14 years 9 months ago #1087
by vintage-threads
Module appearing on articles? was created by vintage-threads
Hello!
So, I installed the extension Hot News Flash, and managed to make it appear above my content with the ja_purity template on the front page after a bit of googling, by adding the code
<jdoc:include type="modules" name="newscustom" />
to the index page just before
<jdoc:include type="component" />
on the index page and making it a position + assigning hot news flash to that position.
I fiddled around a bit with the module assignment and found out that if it it assigned to only 'Home' then it would appear on the articles :S I have no idea how to fix this.
How would I get it to appear only on the front page, and not before every article? I'm using it as a sort of welcome message/other things, so it wouldn't make much sense for it to be on other pages.
I'm just starting my website, and all of my articles are published on front page, as I want it to be sort of like a blog, if that means anything.
If anyone at all could help me out, It would be greatly appreciated
So, I installed the extension Hot News Flash, and managed to make it appear above my content with the ja_purity template on the front page after a bit of googling, by adding the code
<jdoc:include type="modules" name="newscustom" />
to the index page just before
<jdoc:include type="component" />
on the index page and making it a position + assigning hot news flash to that position.
I fiddled around a bit with the module assignment and found out that if it it assigned to only 'Home' then it would appear on the articles :S I have no idea how to fix this.
How would I get it to appear only on the front page, and not before every article? I'm using it as a sort of welcome message/other things, so it wouldn't make much sense for it to be on other pages.
I'm just starting my website, and all of my articles are published on front page, as I want it to be sort of like a blog, if that means anything.
If anyone at all could help me out, It would be greatly appreciated
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6769
- Thank you received: 719
14 years 9 months ago #1088
by milos
Replied by milos on topic Re: Module appearing on articles?
This is issue with Joomla. Home page has Itemid=1, but also all articles linked from the home page. If you like something to show only on home page and nowhere but home page, you should add this code:
above <jdoc:include type="component" />
Code:
<?php if (@$_REQUEST['view'] == 'frontpage') {
<jdoc:include type="modules" name="newscustom" />
} ?>
Please Log in to join the conversation.
-
vintage-threads
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
14 years 9 months ago - 14 years 9 months ago #1089
by vintage-threads
Replied by vintage-threads on topic Re:Module appearing on articles?
Ah, I tried, but it came up with
Parse error: syntax error, unexpected '<' in templates/ja_purity/index.php on line 193
I pasted the code right above <jdoc:include type="component" /> in replacement of <jdoc:include type="modules" name="newscustom" />
Have I done something wrong?
:dry:
Parse error: syntax error, unexpected '<' in templates/ja_purity/index.php on line 193
I pasted the code right above <jdoc:include type="component" /> in replacement of <jdoc:include type="modules" name="newscustom" />
Have I done something wrong?
:dry:
Last edit: 14 years 9 months ago by vintage-threads.
Please Log in to join the conversation.
-
milos
Support Staff - Moderator
Less
More
- Posts: 6769
- Thank you received: 719
14 years 9 months ago #1090
by milos
Replied by milos on topic Re:Module appearing on articles?
Sory, my bad, try this:
Code:
<?php if (@$_REQUEST['view'] == 'frontpage') { ?>
<jdoc:include type="modules" name="newscustom" />
<?php } ?>
Please Log in to join the conversation.
-
vintage-threads
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
14 years 9 months ago #1091
by vintage-threads
Replied by vintage-threads on topic Re:Module appearing on articles?
Wait! It's okay, I've figured it out
The code was supposed to be
<?php if($_REQUEST=="frontpage") : ?>
<jdoc:include type="modules" name="newscustom" />
<?php endif ; ?>
Thanks so much for that! You have no idea how crazy I've been going over this.
The code was supposed to be
<?php if($_REQUEST=="frontpage") : ?>
<jdoc:include type="modules" name="newscustom" />
<?php endif ; ?>
Thanks so much for that! You have no idea how crazy I've been going over this.
Please Log in to join the conversation.
-
vintage-threads
Inactive member - Topic Author
- New Member
Less
More
- Posts: 4
- Thank you received: 0
14 years 9 months ago #1092
by vintage-threads
Replied by vintage-threads on topic Re:Module appearing on articles?
Haha, I think we posted at the same time.
Thank you thank you thank you!
Thank you thank you thank you!
Please Log in to join the conversation.
Time to create page: 0.162 seconds