Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2010-10-18 11:33:44
- martinmpjdesign
- New Member
- Registered: 2010-10-17
- Posts: 3
Absolute beginner question: adding custom javascript to <head> section
Hi all
Other than a test install on my local machine I have no Textpattern experience what so ever. I’m trying to work out if TP will be suitable for a project I’m quoting for. I’m pretty certain it will be fine but I need to be 100% certain…
Basically, I need to be sure that text pattern will allow custom javascript to be inserted between the <head></head> tags – but in a user friendly way because the end user will be doing it. I’m thinking there maybe a plugin which allows it, or maybe simply one of the standard custom fields?
Thanks in advance for your help – I can post code examples if anyone needs them before replying.
Martin
Offline
#2 2010-10-18 11:55:08
- masa
- Member
- From: North Wales, UK
- Registered: 2005-11-25
- Posts: 1,095
Re: Absolute beginner question: adding custom javascript to <head> section
Take a look at stm_javascript
It allows you to manage javascript in a similar way as Textpattern handles CSS.
Offline
#3 2010-10-18 13:21:29
- martinmpjdesign
- New Member
- Registered: 2010-10-17
- Posts: 3
Re: Absolute beginner question: adding custom javascript to <head> section
Hi masa
Thanks, I’ll try to install the plugin for evaluation but I’m not sure if it will do exactly what I need. Being completely and utterly new to TextPattern, would the javascript plugin work in exactly the same way as CSS? And if so, does CSS work as follows:
1) In Presentation/Style either edit current css or paste new css and save with a new name
2) In Presentation/Sections, save a section with the new Uses Style
3) In Content/Write ensure that the correct Section is selected in right-hand column
Thanks Again
Offline
Re: Absolute beginner question: adding custom javascript to <head> section
A few options for including head scripts in specified articles.
Code is topiary
Offline
#5 2010-10-18 13:40:59
- martinmpjdesign
- New Member
- Registered: 2010-10-17
- Posts: 3
Re: Absolute beginner question: adding custom javascript to <head> section
Hi jsoo
I’ve read your linked article – I think your plugin is just what I’m looking for. Thanks for your help.
Martin
Offline