Forums / General / Menu based on articles in a folder

Menu based on articles in a folder

Author Message

Thomas Johansen

Wednesday 19 May 2010 1:05:50 am

Hi.

I'm pretty new with eZ Publish and has started my first project.

The question I have, might already by covered by other posts, but I havent been able to find it yet.....

I have created some content (articles) in a folder under "Media/Things to do". Each article is a general article.

What I would like to do, is to present the content of the folder "Things to do" as a menu on the left side of the 'Frontpage' 'Things to do' and when I click the sub-items, the page stays the same, with the menu to the left and the content in the centre pane.

Can this be acieved in an easy manner?

Appreciate all assistance :)

Regards

Thomas

Nicolas Pastorino

Wednesday 19 May 2010 1:38:59 am

Hi Thomas and welcome to the eZ Community !

What you want to achieve is presented in the default "Website Interface" which you can choose form the setup wizard. In first-level entris pages, the submenu is presented on the left-hand side. Spot the template used there, and get inspiration. Should help you take the first steps.

Let us know how it goes,
Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Thomas Johansen

Wednesday 19 May 2010 1:52:49 am

Thanks for the reply Nicolas!

Ok, but this will affect all 'Frontpages'?

I currently have defined 5 'Frontpages' and I only want this functionality on one specific page.

-Thomas

Thomas Johansen

Thursday 20 May 2010 12:46:14 am

Ok, might be that I'm quite n00bish here now :)

I'm using the default "Website Interface v. 1.6" and have activated the menu 'setup' to include top and left menu, but how do I get that left menu to show? :) ANd how do I define the content of that left menu?

Regards

Thomas

Paul Leclercq

Thursday 20 May 2010 3:40:47 am

Hello Thomas,

If you are using a content type "frontpage", do you mean you are using the ezflow installation?

I am not quite sure to understand what you are trying to do?

Do you mean that you would like a specific mean for everypage?
I this case, you would ideally include the menu in the full view of your template.

If you wish to have a menu which changes depending on a section then you have a number of different ways to do this.
One simple method, is by using jquery or javascript:

1) Set a javascript variable in the full view of your templat:

something like:
<script type="text/javascript">

var my_section = "{$my_section}";

</script>

2) in your menu, check if the variable has been set
{literal}
<script type="text/javascript">
$().ready(function() {
if(typeof my_section != "undefined")
{
$(".menu_items").hide();
$("." + my_section).show();

}}
</script>
{/literal}

Good luck with this,

Thomas Johansen

Thursday 20 May 2010 3:55:18 am

Hi Paul.

I'm using the default "Website Interface v. 1.6" - the blue layout.

What I would like to have, is a static list/view of a set of articles (if it is a menu or just behaving as a menu, I dont care) - This has been done by inserting a embeded object, but when I click on one of the items in the list, the layout changes. I would like the layout to be static - the articles displayed in the list should be displayed in the centre pane of the current layout......and this static list/menu is different from page to page (mainpages displayed in the top menubar (vertical)

Hope that made sense :)

I dont know if this makes it easier or not to show what I want, but here: http://ez.no/ezpublish/manage_ez_publish on the last image, a list/meny styled like that that is static (when I click on i.e. 'Lyon pictures' - Lyon pictures are displayed in the centre pane)

-Thomas

eZ debug

Timing: Jan 29 2025 13:34:33
Script start
Timing: Jan 29 2025 13:34:33
Module start 'content'
Timing: Jan 29 2025 13:34:33
Module end 'content'
Timing: Jan 29 2025 13:34:33
Script end

Main resources:

Total runtime0.1805 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 587.9297180.8359
Module start 'content' 0.00590.0063 768.765697.8516
Module end 'content' 0.01220.1682 866.6172526.5469
Script end 0.1804  1,393.1641 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00361.9931200.0002
Check MTime0.00140.7534200.0001
Mysql Total
Database connection0.00070.397910.0007
Mysqli_queries0.134774.64051410.0010
Looping result0.00110.60561390.0000
Template Total0.167893.010.1678
Template load0.00080.457010.0008
Template processing0.167092.527810.1670
Override
Cache load0.00060.305810.0006
Sytem overhead
Fetch class attribute can translate value0.00120.651110.0012
XML
Image XML parsing0.00030.167410.0003
General
dbfile0.00854.7037200.0004
String conversion0.00000.003630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs