Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-02 21:00:00

progre55
Member
Registered: 2006-05-02
Posts: 668

Category-based article list

I am fairly new to Text Pattern (about a week), but I am very excited about the capabilities and functionality I have seen and utilized so far. I feel comfortable working with the admin interface, as well as the plugins. BUT, I have an issue, which I know is probably very simple, that has me scratching my head.

I have an area of a site that is secure (using the ign_password_protect). My questions is not about the plug in, but once logged in I want to display a list of categories (still not my problem). The problem is that once I display the categories, when you click on the category it sends you to another area and nothing comes up, only incomplete links to images as well as no articles (an example of the url string is http://xx.xxx.xxx.xxx/category/inner-city/. What I had expected is that it would stay within the section and then list out the available articles for viewing or actual have the articles already listed out. Is there someplace where I have to define the section that it should kick to. If so, still not sure why it would not display the articles.

Please let me know what I am missing. Your assistance would be greatly appreciated.

(Edit: updated topic title to something more helpful. :) -Mary)

Last edited by Mary (2006-05-03 03:45:15)

Offline

#2 2006-05-02 21:13:47

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

Re: Category-based article list

Category lists are displayed in the default section by default. If you want them on a section page, you’ll have to handcode your links, like this: site.com/sectionname/?c=categoryname.

Edit: see for a better explanation Stuart’s example.

Last edited by els (2006-05-02 21:15:44)

Offline

#3 2006-05-03 20:33:10

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Category-based article list

Thanks for quick response.

I did some further work and now I can get my list of articles to appear correctly, and when selected it will jump to that article, but when you select an article I still can not figure out what “section/page it is attempting to use. The reason that this is a problem is that the image links are lost (even though on all my sections the image links are fine.) I am using images for my navigation.

Page Code:

<code><txp:article_custom limit=99999 form=“TheGoodForm” section=“classroom_articles” /></code>

Form Code:

<code><!— show the year —>
<txp:if_different>
<h2><txp:posted format=”%Y” /></h2>
</txp:if_different>
<!— show the month —>
<txp:if_different>
<h3><txp:posted format=”%B” /></h3>
</txp:if_different>
<!— article title and link —>
<txp:permlink><txp:title /></txp:permlink>
<br />
<br></code>

Last edited by progre55 (2006-05-03 20:34:46)

Offline

#4 2006-05-03 21:02:09

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

Re: Category-based article list

An individual article always uses the section that is assigned to it. What do your image links look like? Often it helps changing the url from “images/image.jpg” to “/images/image.jpg”.

Offline

#5 2006-05-03 21:21:30

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Category-based article list

My image properties look like the following:

http://xx.xxx.xxx.xxx/classroom_articles/9/images/b_bio_c.jpg

All the images are actually stored in http://xx.xxx.xxx.xxx/images/b_bio_c.jpg

Offline

#6 2006-05-03 21:30:18

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

Re: Category-based article list

That must be the problem of the relative url. How do you create the image links? What is your code (html or txp) to generate them and where do you have it (article, form)?

Offline

#7 2006-05-03 23:35:39

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Category-based article list

The code for the image links is:

<code><a href=“biography” onMouseOver=“biography.src=‘images/b_bio_c.jpg’;” onMouseOut=“biography.src=‘images/b_bio_d.jpg’;”><IMG SRC=“images/b_bio_d.jpg” BORDER=“0” name=“biography” alt=“biography”></A><a href=“philosophy” onMouseOver=“program.src=‘images/b_prm_c.jpg’;” onMouseOut=“program.src=‘images/b_prm_d.jpg’;”><IMG SRC=“images/b_prm_d.jpg” BORDER=“0” name=“program” alt=“program”></A><a href=“comments” onMouseOver=“comments.src=‘images/b_com_c.jpg’;” onMouseOut=“comments.src=‘images/b_com_d.jpg’;”><IMG SRC=“images/b_com_d.jpg” BORDER=“0” name=“comments” alt=“comments”></A><a href=“products” onMouseOver=“products.src=‘images/b_pro_c.jpg’;” onMouseOut=“products.src=‘images/b_pro_d.jpg’;”><IMG SRC=“images/b_pro_d.jpg” BORDER=“0” name=“products” alt=“products”></A><a href=“schedule” onMouseOver=“schedule.src=‘images/b_sch_c.jpg’;” onMouseOut=“schedule.src=‘images/b_sch_d.jpg’;”><IMG SRC=“images/b_sch_d.jpg” BORDER=“0” name=“schedule” alt=“schedule”></A><BR></code>

It appears directly in the page, it does not appear in an article or a form. Is that the issue?

You can think of the page as a main header, then underneath it is a row of buttons (horizontal) then an “text/body area and then a footer …

I did not load the images through text pattern, but through ftp and then linked to the ftp area … I thought that this may be the issue, but when I tested by loading an image through text pattern it still did not resolve it …

Thanks again for the continued dialogue and assistance … it is greatly appreciated …

Last edited by progre55 (2006-05-03 23:37:08)

Offline

#8 2006-05-04 06:42:19

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

Re: Category-based article list

It doesn’t matter that it’s on the page I think.

It probably will be solved if every SRC="images/b_bio_d.jpg" is replaced with SRC="/images/b_bio_d.jpg". Is this code generated by a plugin? Doesn’t look like a regular Txp tag to me.

Edit: looking at the code it’s also not likely a plugin. If you just inserted this code manually on the page, then you can easily add the slashes yourself.

Last edited by els (2006-05-04 06:49:56)

Offline

#9 2006-05-04 07:18:27

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Category-based article list

As Els said, change your image links so they’re absolute:

<code>
<img alt=“desc” src=”/images/b_bio_d.jpg” />

instead of

<img alt=“desc” src=“images/b_bio_d.jpg” />
</code>

Off topic, but have a look at CSS buttons. None of that onmouseover goobly-gawk :).

Offline

#10 2006-05-04 12:42:27

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Category-based article list

You guys are great. Making it absolute, worked like a charm. That is what did the trick.

Regarding deldindesign’s comment, I am going to try it out, think it is a great idea and I myself am not a fan of goobly-gawk :). I will let you know how it goes …

Last edited by progre55 (2006-05-04 12:42:48)

Offline

#11 2006-08-03 02:04:12

progre55
Member
Registered: 2006-05-02
Posts: 668

Re: Category-based article list

deldindesign:

I just wanted to comment on my onmouseover goobly-gawk … I have found great success using the ANC-ROLLOVER plug in.

You were right on with your comment and it focused me on finding a solution to improve my coding and design …

Thanks.

Offline

Board footer

Powered by FluxBB