Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-01-26 17:04:36
- barrywardrop
- New Member
- Registered: 2008-01-26
- Posts: 4
creating dynamic article links within a single section?
Hi,
I wonder if someone could possibly help me?…
I am new to txp and I am trying to build a section page that amongst other static information it will have two divs with tabbed links. the links for example will have, say option 1, option 2, etc.
some how I want to be able to use these links to pull information from articles when clicked but i don’t want to have to leave the page or section. Is this possible and if so could someone please post up some code, that would help to create the links and the article output for such a thing and if you have time explain a little about how it works?
Thank you all in advance!
Barry
Offline
Offline
#3 2008-01-26 18:11:05
- barrywardrop
- New Member
- Registered: 2008-01-26
- Posts: 4
Re: creating dynamic article links within a single section?
Thank you for your reply, It could be an option but I was wondering if there is a way of doing it with what is available within txp as it stands or maybe with a plugin?
I would like to stay away from using js if possible as I would like the page to degrade and still function the same for all users!
I am very new to txp and still very much in the early stages of learning what it can and can not do!
but thank you for your reply it may be the only option!
Does anyone else know of a way around this please?
Thanks in advance
Barry
Offline
Re: creating dynamic article links within a single section?
um theres no way to do it without js. within txp or otherwise. unless you want to go the frame route which is generally always a bad idea.
Offline
#5 2008-01-26 19:51:16
- barrywardrop
- New Member
- Registered: 2008-01-26
- Posts: 4
Re: creating dynamic article links within a single section?
Thanks for your reply, I definitely don’t want to be messing with frames your quite right. I was just curious whether anyone had wanted to do a similar thing and had either found a way around it or written a php plugin to do the job?
Thanks again.
Offline
Offline
#7 2008-01-28 18:07:17
- barrywardrop
- New Member
- Registered: 2008-01-26
- Posts: 4
Re: creating dynamic article links within a single section?
Hi Gocom,
Thanks for your reply. I don’t mind if the page reloads so long as it doesn’t leave that section. what would be the best way of pulling information into the content area that has tabbed links within a page. each tab is to display information from a different article but I would like to be able to do this on that one section without leaving it. what suggestions do people have that would best suit this scenario?
Thanks
Offline
Re: creating dynamic article links within a single section?
if you want to go the ajax way see 10 javascript ajax tabs for various approaches.
if you don’t want to go the ajax way, you can preload the articles. Call the articles so that they each occupy a separate div using txp:article or txp:article_custom, if necessary with limit and offset attributes or txp:article_custom and the id attribute for specific fixed articles. Style the divs as tabs and then hide the divs you don’t want to see with css. Use a js-switcher to show and hide between the tabs. Again there are lots of tutorials.
jquery is part of the txp install, so you may want to choose a method that works with that.
TXP Builders – finely-crafted code, design and txp
Offline
#9 2008-01-31 09:31:19
- wardrop
- New Member
- Registered: 2007-06-25
- Posts: 1
Re: creating dynamic article links within a single section?
Hi Jakop,
Thanks for your reply it has been very helpfull, I am thinking about giving it a go using JS and CSS to hide the articles that arn’t active this way if the user doesn’t have JS they will still see the articles as a list within that div.
Thank you all for your replys and help! ;)
Offline