read children of node_id

Author Message

scrieler _

Thursday 24 April 2008 6:40:59 am

heya,

I need all children node_id's of one node_id
I wanna place one css to node id 178 and childrens

{switch match=$module_result.node_id}

{case match=178}
@import url({"stylesheets/mediendesign.css"|ezdesign});
{/case}
{case match=CHILDREN1}
@import url({"stylesheets/mediendesign.css"|ezdesign});
{/case}
{case match=CHILDREN2}
@import url({"stylesheets/mediendesign.css"|ezdesign});
{/case}

{/switch}

need a loop, but how?

Maxime Thomas

Thursday 24 April 2008 11:57:55 pm

Heya,

Can you be more explicit ? We don't understand what you want to do... So we can't help you.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

scrieler _

Friday 25 April 2008 12:06:25 am

hi Maxime Thomas,

my headerimage is set in my css files,
I want to change this by parent folders.

+Folder1
-Folder2
-Folder3
+Folder4
-Folder5
-Folder6

if I click on Folder1, Folder2 or Folder3 I want to load css file 1
it have to be active for all 3 folders, same in all other groups.
I want to define 1 css file for one parent.

Xavier Serna

Friday 25 April 2008 12:44:33 am

Supposing that folder1 and folder4 are at the same depth level, you only need to check for that in the node path array to know the current tree you are browsing and set the correct css for it.
As an example, for folder1, folder2 and folder3, the path element 2 will be always the same.

hth!

--
Xavier Serna
eZ Publish Certified Developer
Departament de Software
Microblau S.L. - http://www.microblau.net
+34 937 466 205

scrieler _

Friday 25 April 2008 2:39:03 am

ok, right, but how can i check it for my switch script?
$module_result.<path>=folder1>

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 31 2025 04:16:47
Script start
Timing: Jan 31 2025 04:16:47
Module start 'layout'
Timing: Jan 31 2025 04:16:47
Module start 'content'
Timing: Jan 31 2025 04:16:47
Module end 'content'
Timing: Jan 31 2025 04:16:47
Script end

Main resources:

Total runtime0.0130 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 588.1328151.2109
Module start 'layout' 0.00460.0022 739.343836.6484
Module start 'content' 0.00680.0048 775.992294.1406
Module end 'content' 0.01160.0014 870.132833.9922
Script end 0.0130  904.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002418.3880140.0002
Check MTime0.00118.5370140.0001
Mysql Total
Database connection0.00075.113810.0007
Mysqli_queries0.001914.632230.0006
Looping result0.00000.093210.0000
Template Total0.00118.410.0011
Template load0.00086.385810.0008
Template processing0.00031.946410.0003
Override
Cache load0.00064.576410.0006
General
dbfile0.00075.503180.0001
String conversion0.00000.060340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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