Placing menus & attaching content blocks to a page

Stefek

You're welcome.

I'm glad you found your way to WB CMS.

Best Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Anlina

Lol, okay, that works. My, I sure wasted a lot of frustration and stress over this... not sure what I did before that caused it not to work, but I'd tried putting in the show_menu2 call into a code block earlier and it didn't work, so I just gave up on that, but it seems functional now. Thanks!

Stefek

Quote from: Anlina on September 12, 2008, 05:37:41 PM
I just wish there was a way to do a show_menu2 call in a Code section of page.

Thats no problem. Just do it.

You can use the module "code" (or "code2" which is more handy) and place your SM_2  Code inside.
Dont forget to cut the <?php and the ?> off your code.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Anlina

Thank you. :)

I did look at your suggested solution, and I think I could use the description field to add a subheader (h2) (not a great solution, probably really bad for seo) but that presents a new problem. On many pages the title and the header (h1) are the same, but on four pages the header is an image rather than having text in my h1 position.

It also might create issues with positioning the sidebar, though that would probably be easy to resolve. But the image header issue is one that I'm stuck on.

Right now, I'm thinking the best solution may be to hardcode the subnavs into a hidden page and then use the section picker module to add them to the appropriate pages in the appropriate places. Not ideal, but the best I can come up with. I don't think it will be overly problematic for updating either, as the site is going to be fairly static and not have new pages added frequently.

I just wish there was a way to do a show_menu2 call in a Code section of page.

Stefek

I admire this subject and your design skills!

Did you try my suggestions?
I think this will work for you - but there is this litle limitation on choosing H2 different to the page title.

Unfortuanatly I see no other chance to do a trick on it.

Maybe someone else...

Best Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Anlina

Here is one of my in progress pages that has been populated with all of the elements that could possibly appear on one page: http://scholarscanada.com/wb/pages/reading-readiness.php

Stefek

QuoteIs your current work available online? so we can have a look?
Without looking at what you are doing, it is very difficult to help.
Yes, that's true...


The only way I can think of could help you:
you use the
<h2><?php echo PAGE_TITLE?></h2>
for your H2 Hadlines.
Then your submenu code as Ruud proposed.
And then your content.
<?php page_content(); ?>

But thu you can't have custom H2's in your pages. And they are the same as the page title.

Regards,
Stefek
[i]"Gemeinsam schafft man mehr."[/i]

[b][url=http://duden.de/rechtschreibung/gemeinsam#Bedeutung1]gemeinsam[/url][/b]
1. mehreren Personen oder Dingen in gleicher Weise gehörend, eigen
2. in Gemeinschaft [unternommen, zu bewältigen]; zusammen, miteinander
#Duden

Ruud

Website baker is not responsible for placing items in the correct place.
This is all done by the browser and your CSS definitions.

Is your current work available online? so we can have a look?
Without looking at what you are doing, it is very difficult to help.

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Anlina

Thanks Ruud.

Okay, I really, really, really, really want the markup for the submenu to appear below my h2 heading (so, right in the middle of the content really.)

Is there any way to do this? It would make my life infinitely simpler, since I cannot think of a single way to get the content to wrap properly around the submenu when the markup appears above everything, where as a simple float will solve my layout problems if I can stick the markup where I want it to be.

I tried putting the code snippet Ruud provided into a Code section on my page, but that doesn't work.

Any ideas? Is this possible at all with WebsiteBaker?

Ruud

I think (not tested) show_menu2(2,.....) will only show when the current page is in the same tree. So a page that must be a "member" of the 2nd menu.

According to the manual the SM2_ALLMENU is made for your situation. Show all menus.

Good luck with the styling.

Ruud

[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Anlina

#3
Thank you that was very helpful. I've got the image & caption showing - now to style it with css. :)


Your code snippet works great for displaying the child menu for my first menu [1]. I tried using it to display the child menu for a second menu [2] and changed it like so:

();
show_menu2(2, SM2_ROOT+1, SM2_START, false,'[li][a][menu_title]</a>','</li>', '<ul>');


But it doesn't seem to work. Am I missing something?

Edit: Okay, got things functional using SM2_ALLMENU, but I'm still curious why I can't get it working when I specify just my second menu.

Ruud

Hiding/showing the menu (including the surrounding div) can be done like this.

<?php 
// Submenu region, only shown when submenu's are available
ob_start();
show_menu2(1SM2_ROOT+1SM2_STARTfalse,'[li][a][menu_title]</a>','</li>''<ul>');
$childmenu=ob_get_contents();
ob_end_clean();
if (
$childmenu!="") {?>

<div id="submenu">
       <?php echo $childmenu?>
</div>
<?php ?>


If there is no submenu, the div is also not sent.

For the second block of content you could simply use an extra content block.
Create your images and captions in hidden wysiwyg pages that your editors cannot see or change.
Use the section-picker to add them to the pages.
Make sure the editors don't have the rights to edit the section-picker module.

Styling everything with CSS is possible, but it won't be simple ;-)

Hope this helps you further..

Ruud
[url=https://dev4me.com/modules-snippets/]Dev4me - WebsiteBaker modules[/url] - [url=https://wbhelp.org/]WBhelp.org[/url]

Anlina

Okay, there's two things I'm trying to do and I'm not sure the best way to go about it.

1. Placing a menu inline with page content.

On my page, I have my main navigation to the left. I have an optional subnavigation that should appear as a box that sits within the main content of the page (similar to an image that text wraps around.) It should appear directly below the top header & subheader and be floated right.

What is the best way to implement this? The box should only appear when there are child pages and needs to sit inside the content area, with content wrapping around it.

I understand how to use multiple menu calls, I'm just not sure how to get the menu inside my content area (I want to keep all the pages WYSIWYG, as I will not be the only person editing the content.)

2. Placing a block of content beside my main content area.

To the right of my main content area, I want to be able to place an image with a caption below it. I'd like to be able to assign certain images & captions to specific pages.

Is there a way to do this, short of just manually inserting the image and caption into the content area and then using CSS to position it correctly? I'd like to minimize the amount of html in the page, because again, there will be other people editing the text on the page, and the less there is that they can screw up the better.

----

Screenshot of the mocked up layout is attached for reference.




[gelöscht durch Administrator]