Block-item include in multiple layout-files
Hi, @Hubzilla Support Forum+
I would in multiple layout-files how navleft_adm_howto_layout:
include block-item named navleft_hz_adm_howto_menu_block:
But likely I misinterpreted the Hubzilla Markup Language Syntax? Here the result https://hub.freecommunication.org/page/nmoplus/hubzilla-admin-howto .
Page content type is:
* text/plain - for navleft_adm_howto_layout and navleft_hz_adm_howto_menu_block.
* * With Page content type text/bbcode for navleft_adm_howto_layout is the result also wrong
* text/bbcode for https://hub.freecommunication.org/page/nmoplus/hubzilla-admin-howto .
* navleft_adm_howto_layout for hubzilla-admin-howto-layout-file
How can I include navleft_hz_adm_howto_menu_block in multiple menus?
I would in multiple layout-files how navleft_adm_howto_layout:
[region=aside]
[menu]navLeft_menu[/menu]
[block]navleft_hz_adm_howto_menu_block[/block]
[/region]
include block-item named navleft_hz_adm_howto_menu_block:
[menu]navleft_css_tuning_howto_menu[/menu]
[menu]navLeft_Security_howto_menu[/menu]
[menu]navLeft_howto_menu[/menu]
But likely I misinterpreted the Hubzilla Markup Language Syntax? Here the result https://hub.freecommunication.org/page/nmoplus/hubzilla-admin-howto .
Page content type is:
* text/plain - for navleft_adm_howto_layout and navleft_hz_adm_howto_menu_block.
* * With Page content type text/bbcode for navleft_adm_howto_layout is the result also wrong
* text/bbcode for https://hub.freecommunication.org/page/nmoplus/hubzilla-admin-howto .
* navleft_adm_howto_layout for hubzilla-admin-howto-layout-file
How can I include navleft_hz_adm_howto_menu_block in multiple menus?
show all 23 comments
Blocks are "content" and may contain bbcode, markdown, or HTML. You're putting Comanche (e.g. the [menu] declaraion into a block. Comanche is a "layout" language which looks like bbcode but can only be used in page layouts, not in content blocks.
To fix this, you would need to put all the Comanche menu declarations into the navleft_adm_howto_layout. It's possible that you may not require a content block at all on this page.
To fix this, you would need to put all the Comanche menu declarations into the navleft_adm_howto_layout. It's possible that you may not require a content block at all on this page.
Well, but even that
... put all the Comanche menu declarations into the navleft_adm_howto_layout.would I avoid :). Namely I would once create
navleft_hz_adm_howto_menu_block
and again and again to reuse in multiple menus. So that changes in navleft_hz_adm_howto_menu_block
change all menus, that used navleft_hz_adm_howto_menu_block
.
I understand how you want it to work. That's not the issue. The issue is that it doesn't work that way.
Actually we had a way to use menus in blocks at some point. IIRC only in html (or was it bbcode?) blocks. Not sure if it's still functional though... I think i even had it documented somewhere...
My recollection was that you could create a list of links in a block, which is basically a menu and you could even add bootstrap or foundation classes to these, but I'm not aware that we ever parsed the tag [menu] inside a block.
Actually we had a way to use menus in blocks at some point.Can you post a sample, where syntax has this menu in block?
I just did a test and it still works. The block has to be of text/html content type though. It was documented but it seems the documentation got lost in the latest cleanups ( @Andrew Manning where did the content of webpages.bb go? ).
Here is the relevant part of the missing doco:
If a block has text/html content type it can also contain menu elements. Sample content of
will produce HTML like this
Here is the relevant part of the missing doco:
If a block has text/html content type it can also contain menu elements. Sample content of
<p>HTML block content</p>
[menu]menuname[/menu]
will produce HTML like this
<div>
<p>HTML block content</p>
<div>
<ul>
<li><a href="#">Link 1</a></li>
<li><a href="#">Link 2</a></li>
<li><a href="#">Link 3</a></li>
</ul>
</div>
</div>
@neue medienordnung plus Suggestion: You could ask for an example that you could import. (just a suggestion)
@Andrew Manning
Can you provide for download a webpage-item as example with block-item in menus?
@Einer von Vielen Thank You!
Can you provide for download a webpage-item as example with block-item in menus?
@Einer von Vielen Thank You!
Here is a set of elements you can upload as a zip file: https://grid.reticu.li/cloud/andrewmanning/webpages/menu-block.zip
I haven't added the ability to export menu items yet, though, so you'll need to edit the block to reference your own menu.
I haven't added the ability to export menu items yet, though, so you'll need to edit the block to reference your own menu.
@Andrew Manning
This zip-file isn't for webpage-import thought, correct?
This zip-file isn't for webpage-import thought, correct?
I try Import menu-block.zip . Hubzilla told "Error opening zip file" . Hubzilla Version 2.0.7. Node hubzilla.kosebamse.com .-
I get the same thing and I started to debug the problem. The file was generated by the export tool, and my Mac can unzip it, but the error message the import tool gives is an invalid archive file. I don't understand that.
Anyway, I just followed that documentation about using html format block with a menu declaration and it worked for me. If you're still confused I'll post the code of the elements in my example page.
Anyway, I just followed that documentation about using html format block with a menu declaration and it worked for me. If you're still confused I'll post the code of the elements in my example page.