Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default how do i access require($body_code) found in tpl_main_page.php?

    Hey Everyone,
    i have my homepage set to display main Categories (images/text) in the Center column. but when looking at tpl_main_page.php file, i think the code is coming from require($body_code);

    what php file does that come from? i want to add a span tag to the category name link text.

    thanks!

    thanks for all the great help today.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: how do i access require($body_code) found in tpl_main_page.php?

    $body_code is set in the initialization files to whatever file is needed to process the body of the particular page.
    For category listing pages, you would start with tpl_index_categories.php. The file to edit for that tag would be /includes/modules/your_template/category_row.php (copy it from /includes/modules/).
    Add your tags to this statement:
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<br />' $categories->fields['categories_name'] . '</a>'); 
    like this
    PHP Code:
        $list_box_contents[$row][$col] = array('params' => 'class="categoryListBoxContents"' ' ' 'style="width:' $col_width '%;"',
                                               
    'text' => '<a href="' zen_href_link(FILENAME_DEFAULT$cPath_new) . '">' zen_image(DIR_WS_IMAGES $categories->fields['categories_image'], $categories->fields['categories_name'], SUBCATEGORY_IMAGE_WIDTHSUBCATEGORY_IMAGE_HEIGHT) . '<br /><span class="catListingName">' $categories->fields['categories_name'] . '</span></a>'); 

  3. #3
    Join Date
    Oct 2012
    Posts
    282
    Plugin Contributions
    0

    Default Re: how do i access require($body_code) found in tpl_main_page.php?

    got it, thanks!

    getting deep into the ZC

 

 

Similar Threads

  1. need html_header.php & tpl_main_page.php files
    By marvin in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 23 Nov 2011, 06:32 PM
  2. Error MessageWarning: require(includes/application_top.php) [function.require]: faile
    By valbuhagiar in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 31 Oct 2011, 07:44 PM
  3. How Do I Wrap This Conditional Array in tpl_main_page.php?
    By limelites in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 8 Apr 2009, 10:15 AM
  4. PHP help with broken tpl_main_page.php
    By HeresySnowboarding in forum General Questions
    Replies: 4
    Last Post: 18 Sep 2008, 07:48 PM
  5. How to add a static Banner to the tpl_main_page.php
    By djfranknitti in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 23 Jul 2008, 02:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg