1
JackJ
How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/14 0:30

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


edit, see my next post

2
Stewdio
Re: How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/14 0:48

  • Stewdio

  • Community Support Member

  • Posts: 1560

  • Since: 2003/5/7 1


Nice and handy tip for those that could use it.

Don't worry about the bandwidth, in fact if you put your little tutorial here in the forums, it makes it that much easier to search for

3
CBlue
Re: How to trick your visitors into thinking you are a submenu Guru.

Thanks for sharing that Jack! I'll be working on using this tutorial in creating new menus for my sites!

4
JackJ
Re: How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/14 3:19

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Edit..it was late at night..:)


5
JackJ
Re: How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/14 3:22

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


I am not a PHP coder, I just dabble a bit, so I was struggling to find a way to create custom blocks using HTML with menus and submenus. Someone asked me about how to do it, as they had seen this site here

Eventually I figured they probably used a variety of different blocks in exactly the same position.

I have a little menu on my top page called "General" (yet to add the little image to the left of the menu)

macambridge

It turns out it is not to hard to do this with XOOPS unlimited blocks power.

This is a simple HTML method, not a php method

I am basing the code here on my little "General" menu

First you create a custom block for your "Top Page", your "Top Page" is whatever page is set to default i.e "News" or "None" if you don't wish to load a module at the start.

Go to System Admin/Blocks and insert HTML code similar to the following for your included links in a new custom block. You will find the "classes" your style sheet is using in System Admin "Templates", look for "System" and click on "List". Then look for system_block_mainmenu.html and click on "Edit"

This will reveal the classes your template is using. My X2t Template uses "menuMain" and "menuSub". These "Classes" are related to your theme's style sheet in your themes folder (style.css)

So for your first Top Page block insert the code similar to this layout, with your own paths and links.



Not all this needed, but it works for me.

Make this block only visible in the Top Page for now, you can choose other pages or modules later.

The "modules/mypage" link is a little module I made, it is very easy to do your own one page HTML modules--which create one HTML page wrapped within Xoops. You can also call these modules anything you wish. I will make one available for download with instructions on how to make any amount of clones by just altering a couple of lines.

The advantage of having these modules is that you can choose to make your block visible in that page only in blocks, because the module is listed. Of course you can create another block with the same name in a link to an already existing module if you wish.

They also produce a neat link in your browser i.e.

http://www.yoursiste.com/modules/mypagename/

rather than:

http://www.yoursite.com/modules/wfsection/...php?articleid=3

Not as sophisticated as wfsections which I like, but handy for one-of HTML pages.

Edit: I added a download in my site forum
Edit: remember no "Global" search ability included, trying to figure out that one

Now we creat the opened "submenu" block for the destination page.

To do this create another block with the same name and postition, to be made visible in the destination page i.e for the link "My Home Town"

Note: when creating blocks you can select which modules the block is visible in by holding down Ctrl on your keyboard for multiple selection. It is also better to click on "Edit" to the right of an existing block and make your selections in the resulting dialogue box.

Insert code similar to this with your own paths.



Notice I have an external link included. I can also have links to any other module, article or page.

Also notice the layout of this line, you may just need need this style for linking from the modules folder (two levels down in this example)

Dorset


Next, I create individual submenu blocks with the same name and position for each page or module I wish the submenu block to appear in. I can have my non-submenu blocks appear in multiple pages by clicking on "Edit" to the right of the block on blocks admin.

(Submenus and extra links can also be added to the standard mainmenu, see the link "mypage" in my mainmenu, I will add a bit about that later)

Remember to call the blocks by the same name, and place in the same position--they have different id no's assigned to them by Xoops, and grant appropriate permission in "Groups"

It is really a trick of the eye..you have just made a variety of different blocks, and some have more links than others?



6
CBlue
Re: How to trick your visitors into thinking you are a submenu Guru.

I just signed up as a new member on your site, Jack! I look forward to reading more tutorials from you!

7
MadFish
Re: How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/14 8:53

  • MadFish

  • Friend of XOOPS

  • Posts: 1056

  • Since: 2003/9/27


Thanks JackJ, this sounds very cool and may save me some headaches, I'll give it a go :)

8
CBlue
Re: How to trick your visitors into thinking you are a submenu Guru.

Jack, I really love the welcome block you added to your news page. Is it a trade secret or can you share how you created it?

9
JackJ
Re: How to trick your visitors into thinking you are a submenu Guru.
  • 2003/12/15 2:33

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Yes CBlue, I got it from the ibfmodule..Koudinshi, I think he has one you can download without having to have ibf?

regards

10
CBlue
Re: How to trick your visitors into thinking you are a submenu Guru.

Thanks Jack!

Login

Who's Online

255 user(s) are online (169 user(s) are browsing Support Forums)


Members: 0


Guests: 255


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