WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • open a link in another contentblock
  • Print
Pages: [1]   Go Down

Author Topic: open a link in another contentblock  (Read 10360 times)

Offline Gerard

  • Posts: 84
  • Gender: Male
    • Gerard Mollema
open a link in another contentblock
« on: February 08, 2008, 12:42:45 AM »
Hi Bakers,

I have a question. I'm working on my own site  http://www.gerardmollema.nl which uses several contentblocks. Is it possible to make a link in one contentblock which opens into another block in the same page?

Thanks in advance for any suggestions.

Regards,

Gerard
Logged

Offline marathoner

  • Posts: 495
Re: open a link in another contentblock
« Reply #1 on: February 08, 2008, 03:31:37 AM »
If I understand you correctly, you simply want to have links to other parts of the same page...is that correct?

If so, just use the HTML anchor tag pointing to an ID. Something like this:
Code: [Select]
<H1>Table of Contents</H1>
<P><A href="#section1">Introduction</A><BR>
<A href="#section2">Some background</A><BR>
<A href="#section2.1">On a more personal note</A><BR>
...the rest of the table of contents...
...the document body...
<H2 id="section1">Introduction</H2>
...section 1...
<H2 id="section2">Some background</H2>
...section 2...
<H3 id="section2.1">On a more personal note</H3>
...section 2.1...

You would just put the ID tags in the appropriate contentblock.
Logged

Offline Gerard

  • Posts: 84
  • Gender: Male
    • Gerard Mollema
Re: open a link in another contentblock
« Reply #2 on: February 08, 2008, 12:59:11 PM »
Hi Marathoner,
Thank you for your reply.
It's not exactly what I ment. Alltough I can use it for other purposes.

This is what I mean:
Imagine one clicks on my name in the middle of the page (contentblock1), then a picture of my beautifull face  8-) should appear at the leftside (contentblock2). (It's just an example; I don't really want my picture on the site..) But the content in the middle must be unchanged. In fact it's the behaviour what can be achieved by using frames. But I don't like frames.....
I also tried the wrappermodule but that doesn't work fine.

Regards,

Gerard
Logged

Eki

  • Guest
Re: open a link in another contentblock
« Reply #3 on: February 08, 2008, 01:50:46 PM »
Hello Gerard,

How about adding some parameters to the link and link to the same page. Then in the content block to view the content you could add a code section which checks for the parameters.

For example: (page is http://www.example.com/pages/mypage.php)

in contenblock1 place a link like:
Code: [Select]
<a href="http://www.example.com/pages/mypage.php?action=showpic>My Picture</a>
in contentblock2 you would check for the parameter:
Code: [Select]
if(isset($_GET['action']) and $_GET['action']=='showpic'){
   echo '<img src=\"/media/pics/something.jpg\" \/>';
}

I am not much of a programmer, but I think this would work.

regards,
Erik
« Last Edit: February 08, 2008, 01:52:49 PM by Eki »
Logged

Offline Gerard

  • Posts: 84
  • Gender: Male
    • Gerard Mollema
Re: open a link in another contentblock
« Reply #4 on: February 08, 2008, 05:36:01 PM »
Hi Erik,
Thank you for the reply. I'm not a programmer too. Maybe in the future I'll grab tha book about php but in the meantime I just like to design sites with Photoshop and html.
It does'nt work. The FCK-editor removes the code. I can just use html.

Groetjes,

Gerard
Logged

Offline Hans

  • Posts: 914
  • Gender: Male
Re: open a link in another contentblock
« Reply #5 on: February 08, 2008, 07:24:36 PM »
Why not make a template only for this purpose. Then assign that template to the page that you want the effect on. You can embed the code in the template. Not tested though.
Hans
Logged
Hans - Nijmegen - The Netherlands

Offline Gerard

  • Posts: 84
  • Gender: Male
    • Gerard Mollema
Re: open a link in another contentblock
« Reply #6 on: February 14, 2008, 02:44:42 PM »
Hi Hans,
Thank you for your reply. I allready thought about a different template but then I shoudl type the code for every single image I want to show. I think it doesn't work nicely I''m afraid.

For the moment I skipped the idea I had and tried something different. Maybe the ultimate solution comes later.

Regards,

Gerard
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • open a link in another contentblock
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2