Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2011-01-13 20:08:02

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

The form you need to edit is “frontpage”. Find it in Presentation -> Forms. Add something like <div class="floatexcerpt"> to the very beginning of the form, and a closing </div> at the very end. Then add something like

div.floatexcerpt { float:left; width: 300px; }

to the default style under Presentation -> Styles.


Code is topiary

Offline

#14 2011-01-14 17:42:10

haimirich
Member
Registered: 2011-01-12
Posts: 15

Re: excerpt position

I was able to set everything about the excerpt but i still have some questions:

1- on the bottom of the homepage i got this

Page 1 of 2 »
1
2

which is not very beautiful… suggestion?

2- I noticed that the black effect on the red menu bar is visible only in the home page and not in the other pages…

Thank you very much for the help!!

Offline

#15 2011-01-14 18:37:20

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

haimirich wrote:

on the bottom of the homepage i got this

which is not very beautiful… suggestion?

That comes from this code in the “main” form:

<txp:soo_page_count />
<txp:soo_page_links wraptag="ul" class="paginate" break="li" active_class="current" />

Depends on what pagination links/info you want to keep. If you don’t want any, just delete those tags. If you’re keeping it, wrap it in a div and give the div the CSS property clear: both; … If you want to style the page numbers differently, apply CSS to ul.paginate … If you want to translate “Page 1 of 2” to Italian, tell me what the phrase should be and I’ll tell you how to get the tag to do it.

I noticed that the black effect on the red menu bar is visible only in the home page and not in the other pages…

That’s from the lavalamp.js script. I don’t know what it needs to work.


Code is topiary

Offline

#16 2011-01-14 18:53:55

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

You can probably fix the javascript by changing code like this:

 <script type="text/javascript" src="js/jquery-1.1.3.1.min.js"></script>

to be like this:

 <script type="text/javascript" src="/js/jquery-1.1.3.1.min.js"></script>

Or, best of all, like this:

 <script type="text/javascript" src="<txp:site_url />js/jquery-1.1.3.1.min.js"></script>

Do this in every page (Presentation -> Pages) where you find such tags.


Code is topiary

Offline

#17 2011-01-14 22:57:36

haimirich
Member
Registered: 2011-01-12
Posts: 15

Re: excerpt position

Both solution worked jsoo!
Yeah, it would be great to have “Pagina” instead of “Page”.
I will work again to the blog tomorrow, i have another question about the excerpt (maybe a bit complicate so i have to write better english to succesfully explain myself)

Thank you a lot!

Offline

#18 2011-01-15 01:07:52

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

In the “main” form, change this:

<txp:soo_page_count />

to this:

<txp:soo_page_count format="{prev} Pagina {current} di {total} {next}" />

and if that sounds right in Italian, I’ll see about adding it as a translation to soo_page_numbers (the plugin responsible for that tag, which happens to be one of mine).


Code is topiary

Offline

#19 2011-01-15 14:54:27

haimirich
Member
Registered: 2011-01-12
Posts: 15

Re: excerpt position

Ok, here’s the question:

In the home page each excerpt has a background

#left .post .postheader {background: url(images/postheader.jpg) no-repeat; height:10px;}
#left .post .postcontent {background:url(images/postbg.jpg) repeat-y; padding:10px 25px 10px 25px;}
#left .post .postbottom {background: url(images/postbottom.jpg) no-repeat; height:59px;}

Do you think is possible to have different images depending on the Section in which i wrote the article?

If article is in “Video” the excerpt would have green frame, if article is in “geek” would have blue frame and so on….

Is that possible?

Offline

#20 2011-01-15 15:02:37

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

Yes. A simple way would be to add a class for the section. Like so, in the “frontpage” form:

<div class="postheader <txp:section />">

Last edited by jsoo (2011-01-20 01:28:57)


Code is topiary

Offline

#21 2011-01-15 16:17:12

haimirich
Member
Registered: 2011-01-12
Posts: 15

Re: excerpt position

I tried with
<div class=“postheader <txp:section />”>

in frontpage but nothing happened.

Don’t I have to modify the style sheet?
I tried to create a new one for “geek” section with green frame around the excerpt but i didn’t understand how to visualize in home page “geek” articles with green frame instead of red…

Maybe (for sure) i did something wrong or didn’t explain myself very well….. sorryyy!

Offline

#22 2011-01-15 16:45:21

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

haimirich wrote:

Don’t I have to modify the style sheet?

Sorry, I was too terse. Yes, you then have to add the new classes (one for each section) to the stylesheet, and then declare style rules for them. Make sure you put the new style declarations after the ones for .postheader etc.


Code is topiary

Offline

#23 2011-01-15 17:33:35

haimirich
Member
Registered: 2011-01-12
Posts: 15

Re: excerpt position

I added after this:

#left .post .postheader {background: url(images/postheader.jpg) no-repeat; height:10px;}

#left .post .postcontent {background:url(images/postbg.jpg) repeat-y; padding:10px 25px 10px 25px;}

#left .post .postbottom {background: url(images/postbottom.jpg) no-repeat; height:59px;}

THIS LINE:

#left .post .geek {background: url(images/geekpostheader.jpg) no-repeat; height:10px;}

Result is: success as postheader is concerned… but what about postbg and postbottom ?
How can I make them change too?

In frontpage form do i have to add this:
<div class=“postcontent <txp:section />”>
and this:
<div class=“postbottom <txp:section />”>

??

Offline

#24 2011-01-15 18:07:47

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: excerpt position

haimirich wrote:

In frontpage form do i have to add this:
<div class=“postcontent <txp:section />”>
and this:
<div class=“postbottom <txp:section />”>

Yes, exactly. Note that if you want different background images for the different parts, with the classes this way you’ll have to use multiple-class selectors such as:

.postheader.video { /* background rule here */ }
.postcontent.video { /* background rule here */ }
.postbottom.video { /* background rule here */ }

Code is topiary

Offline

Board footer

Powered by FluxBB