Forums / Setup & design / Lastest News Box of the site Two Garden Court Chambers

Lastest News Box of the site Two Garden Court Chambers

Author Message

Leandro Alves

Wednesday 01 September 2004 2:40:21 pm

Hi

What Can I do to display the class article in my template <b>randomly</b> like the <b>"Lastest News Box"</b> in the site Two Garden Court Chambers (http://www.2gardenct.law.co.uk)

Does it is JavaScript?

Please, help me if you can...

Thank's a lot.
Leandro

Paul Borgermans

Wednesday 01 September 2004 3:04:37 pm

http://ez.no/community/contributions/template_plugins/vertical_latest_news_scroller

-paul

This should go into the FAQ apparently, please do so

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

steve walker

Thursday 02 September 2004 4:23:58 am

Leandro,

To get the news shown to be random you need to implement the 'shuffle' randomiser contribution.

If you get it working in the scroller fetch could you submit the code please.

Thanks, Steve.

http://www.oneworldmarket.co.uk

Leandro Alves

Thursday 02 September 2004 6:15:07 am

Thanks All for the replies.

Steve, I don't want to implement "random" articles... I want my result equal the Two Garden site. I'm sorry my english...

So I tried what the Paul posted above, but it didn't work fine.

I followed all instrutions in http://ez.no/community/contributions/template_plugins/vertical_latest_news_scroller and http://www.ez.no/community/forum/developer/how_to_remove_the_last_character_of_a_loop but the news doesn't appear in my site.

The IE return the error:

Line: 352
Characters: 77
Error: Constant of sequence didn't conclude
Code: 0

I am using IE version 6.0.

With this Could you give me some tip?

Thanks a lot!
Leandro

steve walker

Friday 03 September 2004 12:33:30 am

Leandro,

I think this is because the Ez data generated for the scroller contents isnt formatting itself correctly.

The working code for scrolled data should look like:

v_content=[
['/index.php/2gt/latest_news/two_garden_court_chambers_welcomes_two_new_practitioners__1',
'Michael Paget joins Two Garden Court Chambers','_parent'],             
['/index.php/2gt/latest_news/two_garden_court_chambers_welcomes_two_new_practitioners','Marc Willers joins Two Garden Court Chambers','_parent'],             
['/index.php/2gt/news','Get all the latest news from Two Garden Court here...','_parent']
];

The important bit to note is that there is no comma on the last line "['/index.php/2gt/news','Get all the latest news from Two Garden Court here...','_parent']" and currently this is a static line which in the downloaded template that closes off this loop correctly (though I want to rework it with Pauls delimiter suggestion).

Steve.

http://www.oneworldmarket.co.uk

eZ debug

Timing: Jan 20 2025 03:20:21
Script start
Timing: Jan 20 2025 03:20:21
Module start 'content'
Timing: Jan 20 2025 03:20:21
Module end 'content'
Timing: Jan 20 2025 03:20:22
Script end

Main resources:

Total runtime0.2450 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.0075 592.8125180.8125
Module start 'content' 0.00750.0055 773.625098.0703
Module end 'content' 0.01300.2319 871.6953526.2500
Script end 0.2449  1,397.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00391.6076200.0002
Check MTime0.00140.5751200.0001
Mysql Total
Database connection0.00090.349010.0009
Mysqli_queries0.195479.75151410.0014
Looping result0.00150.63181390.0000
Template Total0.231594.510.2315
Template load0.00080.334310.0008
Template processing0.230794.183810.2307
Override
Cache load0.00060.234410.0006
Sytem overhead
Fetch class attribute can translate value0.00080.344210.0008
XML
Image XML parsing0.00020.092710.0002
General
dbfile0.00271.0928200.0001
String conversion0.00000.003230.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.0002 secs