I want to be able to render an element based on the custom tags. So for example if $page['Page']['content'] contains the 'videos' tag, it'll display the videos element which displays a paginated list of all videos. That's the reason for the element() calls. What would approach could you recommend in this case?
On Jun 19, 5:06 pm, euromark <[email protected]> wrote: > i think your approach is wrong > > if u use a helper to replace the tags - no elements are needed... > see BBCODE helper etc which is already in the bakery or other cake > resource pages > > On 19 Jun., 07:23, ramonmaruko <[email protected]> wrote: > > > > > Thank you for this. Problem now is that it will call the element() > > function even if its correspondingtagis not > > found.http://php.pastebin.com/782A86ZM > > > I want it to only call element() when itstagis found inside > > $page['Page']['content']. I tried something like this and it doesn't > > work:http://php.pastebin.com/2dnL11CG > > > I also tried putting echo statements like > > this:http://php.pastebin.com/zGDfY0aY > > but that renders the element even before $newContent is printed/ > > echoed. > > > On Jun 12, 7:07 pm, euromark <[email protected]> wrote: > > > > check outhttp://api.cakephp.org/class/string > > > > this will do the trick > > > > On 12 Jun., 10:05, ramonmaruko <[email protected]> wrote: > > > > > I want to be able to input like this in a textarea: > > > > > [videos] > > > > > and when the field containing that is displayed, the [videos]tagwill > > > > instead be replaced with a call to the videos element. > > > > > echo $this->element('videos'); > > > > > How would I be able to do this? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
