1
melsen
Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/1/14 21:31

  • melsen

  • Just popping in

  • Posts: 97

  • Since: 2003/6/22


I'm using news module 1.44, and are seeking one specific feature which I cant seem to make work.

Example:
When I with TinyContent create a content page, and marks it as a sub-menu, it will appear in the blocks configuration as selectable.. meaning that I can make a specific block show up when I view that certain content page.

This is what I'm trying to accomplish with news.

What I want is, that when I view a specific news category, I want top block to appear, when I view another news category, I need another top block to appear.. and I just cant make that work.

In the blocks configuration, all I can select in regards to the news module is 'All Module Pages'.. and that just isn't good enough.. because that will then show one specific banner for all categories.. and thats wrong in my case.

So, my question for you all is.. how do I work around this?
Allan Melsen
[size=x-small]Founder of R.I.A.[/size]

Renegade Insane Asylum

2
defwind77
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/1/14 22:22

  • defwind77

  • Not too shy to talk

  • Posts: 180

  • Since: 2005/11/11


hmm, know what you mean - I dunno if it's possible to call your 'news block' with some code - that way it'd mean you could just have a single content block with your tiny content stuff as it currently is + your news block below or wherever...

Does anyone know if this is possible?

3
melsen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/12 7:34

  • melsen

  • Just popping in

  • Posts: 97

  • Since: 2003/6/22


I'd still love to hear if someone has a solution to this issue?

I don't know if there is any other news system who supports the generation of making a category as a sub-menu kinda thing that makes it selectable from the blocks configuration....
Allan Melsen
[size=x-small]Founder of R.I.A.[/size]

Renegade Insane Asylum

4
blueteen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/12 11:21

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


hi,
i'm using a tip who permits me to display a block when visitor is on a certain page.

under XOOPS 2.0.13.2
in header.php, near line 65
i've added this code :

if (eregi("storytopic"$_SERVER['QUERY_STRING'])) // search storytopic word in url's variables
        
{
        
$xoopsTpl->assign(array('block_welcome' => '0'));
        }
        else
            {
            
$xoopsTpl->assign(array('bloc_welcome' => '1'));
            }


then, in theme.html


                <{foreach 
item=block from=$xoops_ccblocks}>
                <{if 
$bloc_welcome == 1}>
                <
table align="center" cellpadding="0" cellspacing="2">
                  <
tr
                    <
td> <div class="blockTitle"><{$block.title}>div>
                      <
div class="blockContent"><{$block.content}>div>td>
                  tr>
                table>
                <{/if}>
                <{/foreach}> 
                


thus, if i'm not in any news category, i display my welcome block in center-center position.

I had to make these modifications, because I used the module news in top page, and I did not want that the welcome block is displayed when I was on a category of the news module.

I think that we can adapt this code for your case, and display a particular block on a particular category's page.
can you give us more details, with an exemple of category/url, and block name ?

5
melsen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/12 18:45

  • melsen

  • Just popping in

  • Posts: 97

  • Since: 2003/6/22


I don't really know how to explain it properly.. but here goes:

What I'd like is a way to declare a bunch of various things a "site section"... like.. for instance.

Everything from these news categories belong to to this section.
Everything from these gallery categories belong to that section.
All these content pages belong to that section....

You know... a generic module that could define a section and then configure which things belong in that section...

This section should then be selectable in the blocks configuration... so when you wanted a block to display.. you could make it display specifically for everything that belonged to a specific "section".

That would among other things enable that specific feature I'm looking for.. which is a specific banner belonging to each of my guild portals to display whenever anything that related to that was viewed on the website.

I don't know if this makes sense.. but if a module like that existed.. I'm sure there'd be TONNES of other people who'd find that useable.
Allan Melsen
[size=x-small]Founder of R.I.A.[/size]

Renegade Insane Asylum

6
blueteen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/12 19:49

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


i understand what you say.
however, i can't help you more than i propose on my post
i'm just a XOOPS fan

7
melsen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/13 7:10

  • melsen

  • Just popping in

  • Posts: 97

  • Since: 2003/6/22


Hrmm.. another way to do the sections handling could be:

Create a module. In that module you should be able to create a section. You give that section a name - and all you need there is a sort of array that holds links... URL's.

You type a range of direct links on your website that belongs to that section...

Then you in the block configuration when you set up a block and pick whatever section it belongs to.. it would simply make that block appear when you're viewing one of the links in the array of that section...

Is that difficult to make?
Allan Melsen
[size=x-small]Founder of R.I.A.[/size]

Renegade Insane Asylum

8
blueteen
Re: Static top block when viewing a specific news category - Can that be done, and how?
  • 2006/4/13 13:29

  • blueteen

  • Quite a regular

  • Posts: 379

  • Since: 2004/7/16


that requires much work.
and I do not have competences to do it

however, it's a good idea

Login

Who's Online

473 user(s) are online (378 user(s) are browsing Support Forums)


Members: 0


Guests: 473


more...

Donat-O-Meter

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

Latest GitHub Commits