1
middleton
Smartsection: item image on first page only
  • 2006/12/31 18:56

  • middleton

  • Just popping in

  • Posts: 30

  • Since: 2006/12/21


This is a hack for Smartsection 2.12. It changes the display format so that the item image only displays on the first page. I find it useful on long documents that I've paginated using [pagebreak] -- this way, the image only appears on the first page.

Step 1: edit item.php

Around line 104, you'll see this code:
$xoopsTpl->assign('pagenav', $pagenav->renderNav());

Just below it, add this line:
$xoopsTpl->assign('curpage'$item_page_id);


Step 2: edit /templates/smartsection_item.html

Look for this line:
<{if $item.image_path}>

Modify it to this:
<{if $item.image_path && $curpage == 0}>


That should do it! Now, the image will only show up on the first page.

Brad

Login

Who's Online

416 user(s) are online (301 user(s) are browsing Support Forums)


Members: 0


Guests: 416


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits