Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2010-11-03 04:12:51
- zeusdidit
- Member
- Registered: 2007-10-16
- Posts: 111
Change Stylesheet from Write tab
I would like the ability to choose a stylesheet from the write tab as a drop down. I was thinking this may be possible using a customfield or an output_form. Or it could be a plugin. I was wondering if anyone had suggestions on how to pull this off?
The plan was to have an @import to call specific base styles unless there’s a better option…
Thanks,
Zeus
Offline
Re: Change Stylesheet from Write tab
You could using
- override form (not tested)
or
- a custom field (no pull down)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#3 2010-11-03 05:16:12
- zeusdidit
- Member
- Registered: 2007-10-16
- Posts: 111
Re: Change Stylesheet from Write tab
so you mean create links to different stylesheets using form tags? Brilliant!
Offline
Re: Change Stylesheet from Write tab
You can create different forms and select “Override form”. But this is rather difficult, becase you have to dublicate all form content that is used to render articles. To fix this you can use such code:
Your original default.article form (example):
<h1><txp:title /></h1>
<div class="entry">
<txp:body />
</div>
Than you create new forms where you place your place @import:
form1:
<style>@import(1.css);</style>
<txp:output_form form="default" />
form2:
<style>@import(2.css);</style>
<txp:output_form form="default" />
After this you can:
- Select override form in writetab
- Change article presentation in one form, not jumping through several clones with style.
Second way to to this is to use glz_custom_fields, which provides select menu (or radio button) for custom_fields.
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Pages: 1