Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Embedded styles?
Hi—
I’m new to TXP and trying to use embedded styles to avoid replicating a bunch of CSS lines. My plan is to use the default.css for every page, and then use other style sheets for forms.
The trouble I’ve found is I can’t actually find where CSS information is stored in TXP, and thus can’t point to different style sheets. Has anyone else had this problem or am I approaching this incorrectly?
Thanks,
Patrick
Offline
Re: Embedded styles?
There’s a tab called style under presentation.
There’s also help on the left of the “pages” area called “CAA link (head)”
<code>
<txp:css />
</code>
Offline
Re: Embedded styles?
Oh, and I think you’re talking about using stylesheets rather than inline styles. Separate pages is how the Sections part in the content allows you to assign stylesheets to different pages within the site.
Offline
Re: Embedded styles?
Hi Walker—
I was using the solution you’re proposing, but I’m hoping that I can try some more efficient. I’ll clarify a bit further:
I’d like to use the default css on all of my sections. However, I’d also like to load other stylesheets just for my forms. Thus, I don’t have to duplicate the entire stylesheet + whatever tags I need for the forms, but instead use the default stylesheet + another stylesheet that just contains the form tags.
So, for example, I have a section called “event”. This contains a page called “event” and a corresponding form called “event”. I’d like the page to use the default css and the form to use a different stylesheet.
How’s that sound? Let me know if I’m not being clear enough. Thanks for your help.
Offline
Re: Embedded styles?
PS, you’re right. I meant external styesheets. My mistake!
Offline
#6 2006-06-22 00:49:46
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Embedded styles?
lifelongactivist: create a new stylesheet named “event”. At the top of it, put:
@import url(css.php?n=default);
Then add all your forms bits to this stylesheet.
Next, go to your sections tab, and assign your “event” stylesheet to your “event” section.
Offline
Re: Embedded styles?
Worked like a charm. Thanks!
Offline
Pages: 1