Announcement

Collapse
No announcement yet.

Div Tags Around PHP Widgets

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [CMS] Div Tags Around PHP Widgets

    Hi, I was trying to put a div tag around a PHP widget but it generates an error on the page:


    PHP Code:
    <div class="test_div">
    ob_start(); 

    /* (php stuff) */

    $output $output_bits

    ob_end_clean();
    </
    div

    I don't have any real PHP knowledge and was just hoping there would be some sort of way to do this. Thanks.

  • #2
    what do you want the div to do?.
    Simple Straight Forward EU cPanel vBulletin Web Hosting Provider.

    Comment


    • #3
      I just want it there so that I can have it styled via additional.css.

      Comment


      • #4
        Can this be done?

        Comment


        • #5
          You should include the DIV tags in a custom template for your PHP widget. You shouldn't include HTML in the widget code.

          1) Copy the contents of the vbcms_widget_execphp_page template into a new custom template (Style Manager, choose Add Template on the dropdown).

          2) Name the template (e.g. vbcms_widget_execphp_page_mycustom) and edit the HTML to fit your needs. Save the template.

          3) When configuring your widget, tell it to use your new custom template instead of the default listed in step 1.
          Translations provided by Google.

          Wayne Luke
          The Rabid Badger - a vBulletin Cloud demonstration site.
          vBulletin 5 API

          Comment


          • #6
            Thanks I'll try that.

            Comment


            • #7
              Wayne, just wanted to say that worked perfectly. Thanks for your help.

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X