Jump to content

Tenzing

Members
  • Posts

    4
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Tenzing's Achievements

Newbie

Newbie (2/6)

1

Reputation

  1. As far as I am concerned I would be happy if TinyMCE/Processwire NEVER added the <p> and </p> tags to the beginning and end of my Body field output (or even all textarea fields). If this is possible it would be perfect solution.
  2. I want to add a popup glossary to my Body copy with HannaCode. Example, my Body field is: The best way to drive[[gloss tag="drive"]] the golf ball is to use a stead backswing[[gloss tag="backswing"]] and follow through smoothly... My HannaCode is: <?php namespace ProcessWire; if (isset($tag)) { $faq_page = $pages->get('template=faq-answer,name='.$tag); if ($faq_page->id) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomString = ''; for ($i_for_loop = 0; $i_for_loop < 10; $i_for_loop++) { $randomString .= $characters[rand(0, $charactersLength - 1)]; } $popup_idname = "glossary-{$randomString}"; echo "<a data-toggle='{$popup_idname}'><i class='fi-info'></i></a>"; echo "<div class='dropdown-pane' id='{$popup_idname}' data-dropdown data-hover='true' data-hover-pane='true'>"; echo "<div><strong>{$faq_page->get('headline|title')}</strong>: {$faq_page->details_text}</div>"; echo "</div> "; } } ?> It woks nearly awesome, and inserts the <a>INFO ICON</a> correctly in the Body output, and then after that it inserts the hidden popup html. The popup works etc. However, After the first ICON processwire inserts the </p> BEFORE the rest of the Body. instead of at the end If I add more than one glossary definition to the Body, only the first one has this problem. The (Body ending </p> that TinyMCE puts in has already been rendered. All the others ICON links work awesome no other </p> tags are added. I end up with something looking like this: The best way to drive ICON the golf ball is to use a stead backswing ICON and follow through smoothly...
  3. Thanks Robin! Perfect answer I was hoping to hear. I love Processwire!
  4. I have a page which that gets arguments from urlSegments: mysite.com/thepage/param1/param2/param3/ I need to use $render_results = $thepage->render() in a different template... but what I really want is something like: $render_results = render(/thepage/param1/param2/param3)
×
×
  • Create New...