1
DonXoop
Show block only one time for a module? (or when at the module root page)

If I make a custom block and show it on a module (typically a welcome message with brief instructions) that works great and is very simple to do (and Does use the global Images function, very very handy), also good for temp messages.

But, sometimes I only want to show that block just once or (maybe much easier to do) only on the start page of that module.

My example and first need is on my Gallery page. I want my custom block to only show when they are at the root page or when they first hit the module. Once they are viewing an album or picture the custom block goes away so there is less scrolling.

Maybe easiest to trap it in the theme.html file which avoids module hacks. But that seems inefficient and sloppy, and I'm not sure of the best code/variables to use.

Thanks for thinking....

2
CBlue
Re: Show block only one time for a module? (or when at the module root page)

Have you looked at editing the xoopsgallery_index.html
in your template manager, Don? That is for the front page of the module and not the album pages.

3
DonXoop
Re: Show block only one time for a module? (or when at the module root page)

I could do that but loose the slickness of doing it in Custom blocks. I could just copy and paste what I have in a block and then turn the block off.

I'm hoping there is a more elegant way. I should be able to trap a value that is true only when in the desired state. Then just bypass the blocks loop. Just have to figure out what is available and useful to my theme at the right time.

Hey you warm SC folks, it snowed up here last night. Just not what us Subaru guys were hoping for... Need more snow...

4
CBlue
Re: Show block only one time for a module? (or when at the module root page)

Yep, the temperature the last two days has been around 75 degrees F. Tomorrow it's supposed to turn cold again. We seem to get a lot of winters that have some spring like days mixed into them.

5
PureLuXus
Re: Show block only one time for a module? (or when at the module root page)
  • 2004/1/6 2:37

  • PureLuXus

  • Not too shy to talk

  • Posts: 116

  • Since: 2002/1/3 2


in e-xoops u can choose moduleindex (module/modulename/index.php), other (module/modulename/viewbla.php) special(pages like /search.php /viewinfo.php etc)
i like this way.. and i love the blocks below the module ...

6
DonXoop
Re: Show block only one time for a module? (or when at the module root page)

Quote:

PureLuXus wrote:
in e-xoops u can choose moduleindex (module/modulename/index.php), other (module/modulename/viewbla.php) special(pages like /search.php /viewinfo.php etc)
i like this way.. and i love the blocks below the module ...



Anyway, if I can set $xoop_showcblock = 0 in the Gallery templates (xoopsgallery_viewphoto.html & xoopsgallery_viewalbum.html ) I think that is early enough to cause Center blocks to not show in theme.html

I'm just not sure how to set it (without getting a blank screen when saving the template )

Login

Who's Online

178 user(s) are online (108 user(s) are browsing Support Forums)


Members: 0


Guests: 178


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