template question

rax
Posts: 172
Joined: Sat Oct 05, 2013 9:28 pm

template question

Post by rax »

Can template variables be used in <thumb></thumb> templates? For example <!--CATEGORY_NAME-->, <!--MODEL_NAME-->, <!--SPONSOR_NAME-->, etc...
admin
Site Admin
Posts: 37247
Joined: Wed Sep 10, 2008 11:43 am

Re: template question

Post by admin »

Depends on situation
I think it's easier to try then to theorize )
Don't forget to run script update
rax
Posts: 172
Joined: Sat Oct 05, 2013 9:28 pm

Re: template question

Post by rax »

Yes I've tried and it doesn't work. That's why I'm asking.

For custom template for sponsors or models:

<thumb sponsor=<!--SPONSOR_SLUG--> num=1-100>

and url:

tcms/tube/?sponsor_slug=sponsor1&force_template=sponsor_page

This results in no thumbs being displayed.

I've tried <!--SPONSOR_SLUG--> <!--SPONSOR_SITE--> <!--SPONSOR_ID--> and none of them work.

Build 201704221907
admin
Site Admin
Posts: 37247
Joined: Wed Sep 10, 2008 11:43 am

Re: template question

Post by admin »

tcms/tube/?sponsor_slug=sponsor1&force_template=sponsor_page

you actually don't have to specify that in tag caz tags inherit GET parameters
Don't forget to run script update
rax
Posts: 172
Joined: Sat Oct 05, 2013 9:28 pm

Re: template question

Post by rax »

Thank you. I didn't realize the sponsor= tag wasn't needed. It now works.

I do have an issue with navigation for custom template though. I notice the old rewrites for custom_galleries isn't in the default rewrites anymore. When I add it in manually it doesn't work. I get a "content not found" error.
admin
Site Admin
Posts: 37247
Joined: Wed Sep 10, 2008 11:43 am

Re: template question

Post by admin »

What rewrite doesnt work ?
Don't forget to run script update
rax
Posts: 172
Joined: Sat Oct 05, 2013 9:28 pm

Re: template question

Post by rax »

Code: Select all

RewriteRule ^sponsor_galleries/(.*)/(.*)/$ /tcms/tube/?sponsor_slug=$1&page=$2&force_template=sponsor_list [L]
The navigation doesn't work with this rewrite.

My template:

Code: Select all

			<navigation active_link_style=act_page link_style=not_act_page>
				<li><a href="/sponsor_galleries/<!--SPONSOR_SLUG-->/<!--PAGE_NUM-->/" title="<!--PAGE_NUM-->" style='<!--LINK_STYLE-->'><!--PAGE_NUM--></a></li>
			</navigation>
admin
Site Admin
Posts: 37247
Joined: Wed Sep 10, 2008 11:43 am

Re: template question

Post by admin »

Doe it work w\o rewrite ?
Don't forget to run script update
rax
Posts: 172
Joined: Sat Oct 05, 2013 9:28 pm

Re: template question

Post by rax »

For some reason w/o the rewrite, the navigation isn't displaying whats in the sponsor_galleries template, rather whats in the category template. Possibly a bug?
admin
Site Admin
Posts: 37247
Joined: Wed Sep 10, 2008 11:43 am

Re: template question

Post by admin »

What url w\o rewrite and what exactly it does not display?
Don't forget to run script update
Post Reply