Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-22 20:00:10

ghizza
Member
Registered: 2007-05-22
Posts: 13

Link pointing to the same page

Look at:
http://www.ghizza.com/textpattern/
This is a hard step for a newbie like me, but I imagine a very simple one for you: I have some news headers on the top left (<txp:article_custom allowoverride="0" form="link_bbbb" pgonly="0" sort="Posted desc" status="4" />
with module <txp:permlink><txp:title /></txp:permlink><br><b class="data"><txp:posted /></b>) and some news with full-story on the main page.

When I click on a header, the full-story opens in a new page.
How do I open it in the same page, replacing (or #going at) the full news on the right?
Thanks.

Offline

#2 2007-05-22 21:24:08

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

Re: Link pointing to the same page

If you change this

<txp:permlink><txp:title /></txp:permlink><br><b class="data"><txp:posted /></b>

into

<a href="#<txp:article_id />"><txp:title /></a><br /><b class="data"><txp:posted /></b>

and wrap the content of your main article form in a <div id="<txp:article_id />">...</div> that should work.

BTW, allowoverride="0", pgonly="0", sort="Posted desc" and status="4" are the default values, so you might as well leave those attributes out.

Last edited by els (2007-05-22 21:26:48)

Offline

#3 2007-05-23 00:25:34

ghizza
Member
Registered: 2007-05-22
Posts: 13

Re: Link pointing to the same page

Thank you Els, that works perfectly.
But a problem still remains: look again at the site (http://www.ghizza.com/textpattern).
Everything is alright clicking on the first 4 headlines in the menu, since I included 4 full news in the main page.
If I click on the 5th headline (“Sling Blade”), nothing happens because that news is shown on the second page (http://www.ghizza.com/textpattern/index.php?pg=2).

How can I fix it?

By the way, why on pg=2 the dates are shown in a different mode? (Not “5 minutes ago” but “May 23”).

Offline

Board footer

Powered by FluxBB