Can I include one template e.g. menu multiple times in another template e.g. base layout?

67 views
Skip to first unread message

Eric Nguyen personal

unread,
Mar 24, 2015, 10:59:11 PM3/24/15
to hippo-c...@googlegroups.com
Reason for doing this is that I need to implement offcanvas navigation menu.
Following implement like this one, I need to duplicate the menu in 2 places on the same page.
(Please do not mention Jasny Bootstrap as it's broken, I've tried it a few times)

in my base-layout.ftl, I have the following in 2 different places, but only the first one got displayed:
<@hst.include ref="menu"/>

Tobias Jeger

unread,
Mar 25, 2015, 4:33:21 AM3/25/15
to hippo-c...@googlegroups.com
Hi Eric,

can you attach a screenshot of the relevant page configuration in the Hippo console? 
I would expect that you should be able to do this.

cheers

Tobi

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 101 Main Street, Cambridge, MA 02142

US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

Woonsan Ko

unread,
Mar 25, 2015, 8:01:55 AM3/25/15
to hippo-c...@googlegroups.com
It is going to be supported in 7.10 by this improvement:
- https://issues.onehippo.com/browse/HSTTWO-2183

So, you can store <hst:include /> output to a variable and use it
multiple times.

Regards,

Woonsan

On 3/24/15 10:59 PM, Eric Nguyen personal wrote:
> Reason for doing this is that I need to implement offcanvas navigation menu.
> Following implement like this one <http://www.bootply.com/92159#>, I
> need to duplicate the menu in 2 places on the same page.
> (Please do not mention Jasny Bootstrap as it's broken, I've tried it a
> few times)
>
> in my base-layout.ftl, I have the following in 2 different places, but
> only the first one got displayed:
>
> <@hst.include ref="menu"/>
>
> --
> Hippo Community Group: The place for all discussions and announcements
> about Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-c...@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google
> Groups "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hippo-communi...@googlegroups.com
> <mailto:hippo-communi...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.


--
w....@onehippo.com www.onehippo.com
Boston - 745 Atlantic Ave, 8th Floor, Boston MA 02111
Amsterdam - Oosteinde 11, 1017 WT Amsterdam

Eric Nguyen personal

unread,
Mar 25, 2015, 10:28:20 AM3/25/15
to hippo-c...@googlegroups.com
Hi Tobi,

I didn't touch the console at all.
This is purely done in .ftl file.

Anw, I managed to find a better offcanvas navigation menu solution that doesn't require duplicates of the menu

Tobias Jeger

unread,
Mar 25, 2015, 11:54:40 AM3/25/15
to hippo-c...@googlegroups.com
ok. I believe that (at least with currently available versions) you'd have to have symmetry between your hst.include tags and your page's hst:component configuration structure. If your template has two hst.include tags, your component configuration should have two child components, using different names. But that's just my expectation, I haven't tried it myself yet.

cheers

Tobi
Reply all
Reply to author
Forward
0 new messages