Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2008-09-22 18:40:44

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

so I think I’ll have to put this: <txp:article form=“displayform” limit=“1” /> and delete this part of code:

<txp:if_category> <h2><txp:category title=“1” /></h2>

<div class=“hfeed”> <txp:article form=“article_listing” limit=“5” /> </div>
<txp:else /> <txp:if_search> <h2><txp:text item=“search_results” />: <txp:page_url type=“q” /></h2>

<div class=“divider”><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” alt=”—-” title=”“ /></div> </txp:if_search>

<div class=“hfeed”> <txp:article limit=“5” /> </div>
</txp:if_category>

<txp:if_individual_article> <div class=“divider”><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” alt=”—-” title=”“ /></div>

<p><txp:link_to_prev>&#171; <txp:prev_title /></txp:link_to_prev> <txp:link_to_next><txp:next_title /> &#187;</txp:link_to_next></p>
<txp:else /> <p><txp:older>&#171; <txp:text item=“older” /></txp:older> <txp:newer><txp:text item=“newer” /> &#187;</txp:newer></p>
</txp:if_individual_article>


Alla batteria dai retta ballA

Offline

#14 2008-09-22 18:46:33

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: sections link straight to the article

Please tell us exactly what should happen on your About page, then we can help you with the contents of the page.

Edit: I gave you two case scenarios above – which one suits your situation?

Last edited by jstubbs (2008-09-22 18:47:09)

Offline

#15 2008-09-22 18:56:54

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

thats the page: http://www.naiocast.theartofweb.net/

I used this one:

<txp:article form=“displayform” limit=“1” />

“displayform” form has this:

<div class=“entry-content”>
<txp:body />
</div>

Since the rest of my site is going to look like this I thought I’d delete the code I prev posted:<txp:if_category>…</txp:if_category> and <txp:if_individual_article>…</txp:if_individual_article> is there anything wrong in doing this?

my about page is working great and I guess in the section panel If I change “On front page = y” it’ll display as the first page…now my last question is how can I have those links checked when I click on them? And, how can I have the About Me link checked in the home page?

thanks ever so much


Alla batteria dai retta ballA

Offline

#16 2008-09-22 19:10:06

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: sections link straight to the article

Checked??

Offline

#17 2008-09-22 19:47:23

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: sections link straight to the article

I meant what should happen when a visitor arrives at your /about page – what do you want them to see? Then we can help you figure out how to markup your TXP about page template….

As to your latest question:

Section list – see the active_class=“class name” part, and set your active class in your CSS accordingly.

Offline

#18 2008-09-22 19:51:53

hakjoon
Member
From: Arlington, VA
Registered: 2004-07-29
Posts: 1,634
Website

Re: sections link straight to the article

One thing I’ve done in the past is to create a custom field called “Section_Home_Page”, you populate it with yes or no then you can use

<txp:if_article_list>
	<txp:article Section_Home_Page="yes" limit="1" />
</txp:if_article_list>
<txp:if_individual_article>
          <txp:article limit="1" />
</txp:if_individual_article>

which will display the article marked as “Section_Home_page” when you are on an article list (section page) otherwise it will show the regular article. This allows for /section/title urls. which I prefer over /title urls.

I use glz_custom_fields to make the custom field a simple checkbox. Works pretty well.

It would be nice to be able to select an article based on url-title so you could have a pattern that an article with the same name as the section gets used as the section home page (there’s probably a plugin that will do that, I haven’t looked)


Shoving is the answer – pusher robot

Offline

#19 2008-09-22 22:35:58

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

jstubbs wrote:

I meant what should happen when a visitor arrives at your /about page – what do you want them to see? Then we can help you figure out how to markup your TXP about page template….
As to your latest question:
Section list – see the active_class=“class name” part, and set your active class in your CSS accordingly.

When a visitor arrives at my /about page some text is to be shown. The same goes for /portfolio, /contact etc…so I think I successfully sorted it out.


Alla batteria dai retta ballA

Offline

#20 2008-09-22 23:00:42

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

the active_class is working great! I did this:

<txp:section_list active_class=“section_list_active” wraptag=“ul” break=“li” />

with the following style:

.section_list_active { font-weight: bold;
}

I was wondering how I could have a given section “active” as default…can it actually be done?

thanks


Alla batteria dai retta ballA

Offline

#21 2008-09-22 23:49:02

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

my last questio is how can i redirect from default page to a given page? thanks


Alla batteria dai retta ballA

Offline

#22 2008-09-23 10:59:48

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

just for the records those are the page template and form display:

http://www.theartofweb.net/txt/textpattern_page.txt
http://www.theartofweb.net/txt/displayarticle.txt


Alla batteria dai retta ballA

Offline

#23 2008-09-23 17:35:19

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

Re: sections link straight to the article

theartofweb wrote:

my last questio is how can i redirect from default page to a given page? thanks

Not quite sure I understand the question – can you give an example of what you mean?

Offline

#24 2008-09-23 18:34:12

theartofweb
Member
From: Rome, Italy
Registered: 2008-09-22
Posts: 15
Website

Re: sections link straight to the article

suppose my site is www.mysite.com i would like to be redirected at www.mysite.com/about

in a nutshell i do not want any default page


Alla batteria dai retta ballA

Offline

Board footer

Powered by FluxBB