WebsiteBaker Support (2.8.x) > Templates, Menus & Design

open a link in another contentblock

(1/2) > >>

Gerard:
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

marathoner:
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: ---<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...
--- End code ---

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

Gerard:
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

Eki:
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: ---<a href="http://www.example.com/pages/mypage.php?action=showpic>My Picture</a>
--- End code ---

in contentblock2 you would check for the parameter:

--- Code: ---if(isset($_GET['action']) and $_GET['action']=='showpic'){
   echo '<img src=\"/media/pics/something.jpg\" \/>';
}

--- End code ---

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

regards,
Erik

Gerard:
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

Navigation

[0] Message Index

[#] Next page

Go to full version