Php 在另一个块中使用Magento块

Php 在另一个块中使用Magento块,php,magento,random,block,Php,Magento,Random,Block,我正在使用Magento自定义块,如下所示: {{.... template="page/mytemplate.phtml" variable="100" ....}} 每次执行块时,我想将值“100”更改为随机数。我试着在这个模块中实现另一个模块。比如: {{... template="page/mytemplate.phtml" variable="{{ ... ANOTHER BLOCK HERE ...}}" ...}} 但它打破了第一块的执行。有人知道解决这个问题的好方法吗?

我正在使用Magento自定义块,如下所示:

{{.... template="page/mytemplate.phtml" variable="100" ....}}
每次执行块时,我想将值“100”更改为随机数。我试着在这个模块中实现另一个模块。比如:

{{...  template="page/mytemplate.phtml" variable="{{ ...  ANOTHER BLOCK HERE  ...}}" ...}}

但它打破了第一块的执行。有人知道解决这个问题的好方法吗?

我想您已经为两个块设置了相同的名称,请尝试使用不同的块名称,然后检查。@user247217我应该在哪里指定块的名称?我只需在templates/pages文件夹中添加一个文件,然后从那里使用它,{{{….template=“page/mytemplate.phtml”variable=“100”name=“yourblockname1”}和{….template=“page/mytemplate.phtml”variable=“100”name=“yourblockname2”}此外,您将为这两个模板设置相同的模板,因此尝试使用不同的模板或添加模板(如果需要)conditions@user247217我非常喜欢这样尝试:{{block type=“folio/folio”template=“folio/list.phtml”showdescription=“1”foliotheme=“masonryproject”lightbox=“1”showpostbtn=“0”itemsperpage=“300”viewmagetxt=“Bild anzegen”filteraltext=“Alle”showdate=“0”name=“galerie”test={{{block type=“core/template”template=“beins/beins_rnd.phtml”name=“rnd”}}}}}它输出第一个块并在第二个块后中断。其余代码将像纯文本一样输出。我可以看到第二个块后的最后一个字符:“}”