Author Topic: Chunk di dalam chunk  (Read 4143 times)

0 Members and 1 Guest are viewing this topic.

Offline dvio

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Chunk di dalam chunk
« on: March 08, 2011, 10:06:04 AM »
Nyubi minta diajarin, mohon bimbingannya :D

Baru coba2 bikin website pake MODx, cari2 tutorial, sedikit mengerti :D

versi: MODx Revolution 2.0.8-pl (traditional)

Pertanyaan:
  Bagaimana caranya memanggil chunk pada sebuah chunk. Misalkan kita punya 2 buah chunk, chunk a dan chunk b, kita mau memanggil chunk b dari chunk a, gimana caranya? Dicoba seperti memanggil chunk pada template, tp ga mau nongol, mungkinkah bisa memanggil chunk oleh chunk yg lain?

Quote from: gagal
Chunk a:
Code: [Select]
<div id = "wrapper_main">
    [[$b]]
</div>

Chunk b:
Code: [Select]
<div class= "test">
    <a href="#">test</a>
</div>

Mohon pencerahnnya ... Thanks b4 ;)

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 344
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Chunk di dalam chunk
« Reply #1 on: March 08, 2011, 10:34:27 AM »
Coba jangan di cache (uncached), pake tanda seru ( ! )

Quote from: gagal
Chunk a:
Code: [Select]
<div id = "wrapper_main">
    [[!$b]]
</div>

Dan juga, Clear Cache setiap baru mengubah templatenya.
« Last Edit: March 08, 2011, 10:36:45 AM by goldsky »
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline dvio

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Chunk di dalam chunk
« Reply #2 on: March 08, 2011, 10:51:25 AM »
Thengkyu 4 the fast  response :D

Tp masih gagal brader, udah aku ganti uncached pake tanda ! save, trus clear cache, tetep ga bisa ... di sourcenya jadinya kosong, jd pasti diparse, cuma ga ada outputnya :(

Ada ide yg lain? :D

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 344
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Chunk di dalam chunk
« Reply #3 on: March 08, 2011, 11:56:14 AM »
Loh?
Isi templatenya apaan aja?
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline dvio

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Chunk di dalam chunk
« Reply #4 on: March 08, 2011, 12:06:53 PM »
Sori bro, maksudku yang kosong cuma chunk b aja (yg dipanggil sama chunk a) yg lain semua ada, header, content, footer, lengkap semua, kecuali chunk b (hilang menguap) :D

jd klo misalkan:
chunk a:
Code: [Select]
line a1 <br />
[[!b]]
line a2

chunk b:
Code: [Select]
line b <br />
hasil sourcenya jd:
Code: [Select]
line a1 <br />

line a2
note: line b jd space kosong

yg diharapkan:
Code: [Select]
line a1
line b
line a2
« Last Edit: March 08, 2011, 12:18:17 PM by dvio »

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 344
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Chunk di dalam chunk
« Reply #5 on: March 08, 2011, 06:44:31 PM »
Maksudnya
Quote
line a1
[[!$b]]
line a2
kali, ya?
karena [[!b]] bukan chunk b, tapi snippet b.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

Offline dvio

  • Newbie
  • *
  • Posts: 26
  • Karma: +0/-0
Re: Chunk di dalam chunk
« Reply #6 on: March 08, 2011, 10:00:07 PM »
Udah bisa brader, makash. ternyata namanya ga sesuai ... tangan ma kepala ga singkron .. hehe :D

btw, ada ga ya settingan supaya klo nama chunk ato snippet ga ada, keluar error notification

Offline goldsky

  • tweets @_goldsky
  • Administrator
  • Sr. Member
  • *****
  • Posts: 344
  • Karma: +1/-0
  • Less is more
    • Virtudraft Intermedia Telematika
Re: Chunk di dalam chunk
« Reply #7 on: March 08, 2011, 11:32:46 PM »
coba check-check aja Reports > Error Log
Rico
Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!

Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets | IE 6 must die !

Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

PING ME ON TWITTER @_goldsky

 

term