PHP WEB SCRIPTS    Support Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

change template being used with SQL command

 
Post new topic   Reply to topic    PHP Web Scripts Forum Index -> Link Up Gold Support & Discussion
View previous topic :: View next topic  
Author Message
Richardw



Joined: 27 Nov 2003
Posts: 257
Location: Toronto, Ontario Canada

PostPosted: Tue Sep 08, 2015 8:29 pm    Post subject: change template being used with SQL command Reply with quote

I have decided to use a different template in on of my categories.

Is there an SQL command that I could use to change all templates in the specific category?

I want to replace 'category.html' with 'category_jobs.html' in category #365.
_________________
Richard E. Ward
Looksee.info
LookSee Bookstore Shop
Beyond Motivation by James Tackaberry McCay with Richard E. Ward
Back to top
View user's profile Send private message
PHPWebScripts
Richard - Admin


Joined: 13 Jan 2003
Posts: 6233

PostPosted: Wed Sep 09, 2015 5:07 am    Post subject: Reply with quote

If you want to set a custom template for a category, just create the template in the templates folder (its name should contain the word category and the extension html). Then choose this new template in admin area in the category edit form.
Back to top
View user's profile Send private message
Richardw



Joined: 27 Nov 2003
Posts: 257
Location: Toronto, Ontario Canada

PostPosted: Wed Sep 09, 2015 5:44 am    Post subject: Reply with quote

I have 50 sub categories using the the template 'category.html'.

I wondered if there is an SQL command that I can run that will change the template being used to 'category_jobs.hml' so that I do not have to manually change them all?
_________________
Richard E. Ward
Looksee.info
LookSee Bookstore Shop
Beyond Motivation by James Tackaberry McCay with Richard E. Ward
Back to top
View user's profile Send private message
PHPWebScripts
Richard - Admin


Joined: 13 Jan 2003
Posts: 6233

PostPosted: Wed Sep 09, 2015 7:12 am    Post subject: Reply with quote

You can use this MySQL command:
update lug_cats set tmpl_cat = 'category_jobs.html' where bigboss = 365;
Back to top
View user's profile Send private message
Richardw



Joined: 27 Nov 2003
Posts: 257
Location: Toronto, Ontario Canada

PostPosted: Sat Sep 12, 2015 11:19 am    Post subject: Reply with quote

Excellent. Was very easy to do. Thanks.
_________________
Richard E. Ward
Looksee.info
LookSee Bookstore Shop
Beyond Motivation by James Tackaberry McCay with Richard E. Ward
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PHP Web Scripts Forum Index -> Link Up Gold Support & Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group