1
miealex
How do I declare a "if" statement for a certain module?
  • 2006/5/22 15:47

  • miealex

  • Just popping in

  • Posts: 96

  • Since: 2004/12/12


Hello,

I want to post in the title section of my theme a photos description. The problem is I don't know how to declare a if statement for a certain module. I want my code to be something like this:

<{if [b]$module.name=myalbum}[/b]>
<
title><{$xoops_sitename}> - <{$xoops_pagetitle}> - <{$photo.title}></title>
<{else}>
<
title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<{/if}>


How should I put the bold part so ONLY when I'm on myalbum module to show that title
<{$xoops_sitename}> - <{$xoops_pagetitle}> - <{$photo.title}>


On other pages I want the other title
<{$xoops_sitename}> - <{$xoops_pagetitle}>


If anyone knows about it I would apreciate the help.

Thanks,
Alex

2
davidl2
Re: How do I declare a "if" statement for a certain module?
  • 2006/5/22 15:49

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Some tips on this nature can be found in the news article here

3
miealex
Re: How do I declare a "if" statement for a certain module?
  • 2006/5/22 15:54

  • miealex

  • Just popping in

  • Posts: 96

  • Since: 2004/12/12


YES! YES! YES! Thank you!


So the code is now:
<{if $xoops_dirname == 'myalbum'}>
<
title><{$xoops_sitename}> - <{$xoops_pagetitle}> - <{$photo.title}></title>
<{else}>
<
title><{$xoops_sitename}> - <{$xoops_pagetitle}></title>
<{/if}>


Cool!!! Now all my gallery will be indexed

4
davidl2
Re: How do I declare a "if" statement for a certain module?
  • 2006/5/22 17:06

  • davidl2

  • XOOPS is my life!

  • Posts: 4843

  • Since: 2003/5/26


Looks like you got it working on your site

5
OldFriend
Re: How do I declare a "if" statement for a certain module?
  • 2006/5/23 14:51

  • OldFriend

  • Just popping in

  • Posts: 99

  • Since: 2005/10/28


<{if $xoops_dirname == 'myalbum'}>
<
title><{$photo.title}> - <{$xoops_pagetitle}> - {$xoops_sitename}></title>
<{else}>
<
title><{$xoops_pagetitle}> - {$xoops_sitename}></title>
<{/if}>


I think that it will index better like this...

6
miealex
Re: How do I declare a "if" statement for a certain module?
  • 2006/6/3 23:15

  • miealex

  • Just popping in

  • Posts: 96

  • Since: 2004/12/12


Quote:
I think that it will index better like this...


I think you're right. I've also changed the "Site name" (All ROmanian Crews) with "Slogan for your site" (Graffiti Site).

So now the index page title looks the same for engines as it looked before the change in the theme:
All ROmanian Crews - Graffiti Site

... on the inside pages I have now "Graffiti Site" part which is more important in searched words for my site then the previous one (All ROmanian Crews)

Thanks,
Alex

Login

Who's Online

151 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 151


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits