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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 01:16:56
Script start
Timing: Jan 19 2025 01:16:56
Module start 'layout'
Timing: Jan 19 2025 01:16:56
Module start 'content'
Timing: Jan 19 2025 01:16:57
Module end 'content'
Timing: Jan 19 2025 01:16:57
Script end

Main resources:

Total runtime0.5433 sec
Peak memory usage4,096.0000 KB
Database Queries65

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 589.3984152.6563
Module start 'layout' 0.00500.0027 742.054739.5078
Module start 'content' 0.00770.5342 781.5625595.3281
Module end 'content' 0.54190.0013 1,376.890612.1094
Script end 0.5433  1,389.0000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.5685160.0002
Check MTime0.00130.2402160.0001
Mysql Total
Database connection0.00070.123910.0007
Mysqli_queries0.489490.0898650.0075
Looping result0.00050.0976630.0000
Template Total0.518795.520.2593
Template load0.00170.316420.0009
Template processing0.517095.153620.2585
Template load and register function0.00020.029710.0002
states
state_id_array0.00060.106910.0006
state_identifier_array0.00050.100720.0003
Override
Cache load0.00150.2732400.0000
Sytem overhead
Fetch class attribute can translate value0.00040.081030.0001
Fetch class attribute name0.00100.175160.0002
XML
Image XML parsing0.00070.133230.0002
class_abstraction
Instantiating content class attribute0.00000.002460.0000
General
dbfile0.00080.1395170.0000
String conversion0.00000.001340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 21
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs