Author Topic: videos by categoy on a custom template  (Read 1043 times)

0 Members and 1 Guest are viewing this topic.

Offline mac500

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
videos by categoy on a custom template
« on: December 05, 2013, 04:22:33 PM »
How do you display specific categories in a custom template?

I have tried:

{videos
var=$videos
amount=80
category=(tried numbers, category names, and url)
paginate=true
sort=date_added DESC}

And nothing works. I have tried category name as displayed in the script, have tried various numbers and nothing works.


Offline adultland

  • Newbie
  • *
  • Posts: 5
  • Karma: +1/-0
    • View Profile
Re: videos by categoy on a custom template
« Reply #1 on: December 07, 2013, 09:59:49 AM »
To use a custom template you need to create a .tpl file called custom-something.tpl (not it must begin with custom- , eg custom-bycategory.tpl)

Offline mac500

  • Newbie
  • *
  • Posts: 9
  • Karma: +0/-0
    • View Profile
Re: videos by categoy on a custom template
« Reply #2 on: December 16, 2013, 02:38:20 PM »
i have already create the template custom-content-by-category.tpl

my rewrite

 
Code: [Select]
RewriteRule ^some/other/([^/]+)/?([0-9]+)?/?$ custom.php?t=content-by-category&p=$1 [L]


and this are the templates


Code: [Select]
<li><a href="{$g_config.base_uri}/some/other/{$c.url_name}">{$c.name}</a></li>


if click on this link i want to display videos by category on custom template content-by-category.tpl

this is my code

Code: [Select]
{category var=$category url=$g_category_url}
{template file="global-header.tpl"}
<div id="container">
    <div id="content">
   
 
       
       
        {videos
        var=$videos
        amount=10
        category=$category.category_id
        paginate=true
        pagination=$pagination
        sort=date_added DESC}
</div>
</div>


instead of category it shows all the videos from every category.

any soloutions out there???

Unofficial JMB Support Forums

Re: videos by categoy on a custom template
« Reply #2 on: December 16, 2013, 02:38:20 PM »


 

Related Topics

  Subject / Started by Replies Last post
12 Replies
3049 Views
Last post November 26, 2012, 12:38:34 PM
by Chad
1 Replies
944 Views
Last post October 16, 2012, 07:01:08 PM
by Chad
0 Replies
947 Views
Last post July 08, 2013, 10:56:44 PM
by WebbieTube
3 Replies
1048 Views
Last post November 23, 2013, 09:07:25 PM
by mac500
1 Replies
1027 Views
Last post July 17, 2015, 01:56:26 PM
by kritter