Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-12-25 14:04:03

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Front layout as back page?

I’m trying to replicate the front page as a fixed feature throughout. So when the user clicks an entry, it displays the entry on the left, but also the two columns (about and amazon listing) displayed even on the back page

The site is here

I tried to copy and paste the default page for the back page, but it didn’t quite work. In fact it didn’t work.

Thanks in advance

Offline

#2 2005-12-25 16:58:18

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Front layout as back page?

sekhu try using the <code><txp:if_individual_article></code> tags for your sidebar, so that it appears in that context as well as the default role.

Matthew


Offline

#3 2005-12-25 17:24:17

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: Front layout as back page?

Hmm I tried that but then it made the side bars disappear. Here’s the code I’m using for the default:

<code>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head> <meta http-equiv=“content-type” content=“text/html; charset=utf-8” /> <link rel=“stylesheet” href=”<txp:css />” type=“text/css” media=“screen” /> <title><txp:page_title /></title>
</head>
<body>

<div id=“accessibility”> <a href=”#content” title=“Go to content”>Go to content</a> <a href=”#sidebar-1” title=“Go to navigation”>Go to navigation</a> <a href=”#sidebar-2” title=“Go to search”>Go to search</a>
</div> <!— /accessibility —>

<div id=“wrapper”>

<div id=“top”>

<txp:output_form form=“top_nav” />

<!— head —>
<txp:output_form form=“header” />

</div> <!— close top —>

<!— left —>

<div id=“main”>

<div id=“content”>

<txp:article limit=“5” />

<txp:if_section name=”“>

<txp:if_individual_article>
<p>
<txp:link_to_prev><txp:prev_title /></txp:link_to_prev>
<txp:link_to_next><txp:next_title /></txp:link_to_next>
</p>

<txp:else />

<p>
<txp:older>Previous</txp:older>
<txp:newer>Next</txp:newer>
</p>
</txp:if_individual_article>

</txp:if_section>

</div> <!— close content —>

<txp:if_section name=”“>

<!— right —>

<div id=“about”>

<div id=“words”>About Me</div>
<p>Single, 25 years of age
<br /><strong>Like</strong> cocaine & travelling
<br /><strong>Hate</strong> elitists & the conceited
<br /><strong>Currently</strong> medicated for schizophrenia.</p>
<div id=“mypic”><img src=“http://cowinside.com/images/pictureofme.jpg” /></div>

<hr class=“clearer” />

<div id=“categories”>
<strong>Categories</strong><br />
<txp:category_list />
</div>

<hr class=“clearer” />

<div id=“latest”>
<strong>Recent Entries</strong><br />
<txp:recent_articles limit=“10” break=”<br />” sortby=“Posted” sortdir=“desc” />
</div>

</div> <!— close about —>
<hr class=“clearer” />

<div id=“amazon”>

<div id=“read”>
<strong>Read</strong>
<br /><txp:asv_amazon asin=“0552772178”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“seen”>
<strong>Seen</strong>
<br /><txp:asv_amazon asin=“B000BYA5GO”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“played”>
<strong>Played</strong>
<br /><txp:asv_amazon asin=“B000BHIQUS”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“heard”>
<strong>Heard</strong>
<br /><txp:asv_amazon asin=“B0001M7P78”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

</div>
</txp:if_section>

</div> <!— close main —>

<!— footer —>

</div> <!— close wrapper —>

</body>
</html>
</code>

Offline

#4 2005-12-25 19:03:41

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Front layout as back page?

Sekhu,
You need to use the if_indi tag around your sidebar html.

for instance:

…content….
…sidebar content…
<code><txp:if_inidividual_article>
…sidebar content…
</txp:if_individual_article>
</code>

That way your sidebar shows up whether you are in an indi article or not. If you ever include categories, you’ll need to include an if_cat tag. Got me now?

Matthew


Offline

#5 2005-12-25 19:38:43

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: Front layout as back page?

I understand that bit, but I did as you said, I wrapped from “about” to the end of the last amazon item, with the if_indvidual_article tag and it made it disappear.

If I remove the if_individual tag around the sidebar content it reappears.

Offline

#6 2005-12-26 00:21:53

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Front layout as back page?

Sekhu,
You need to repeat the sidebar content. Once without the tag and once with the tag.

or like this:

<code>
<txp:if_individual_article>
content that shows when an individual article is selected…(could be the same content as below)
<txp:else />
content that shows in all other circumstances…(could be the same content as above)
</txp:if_individual_article>
</code>

Try that.

Matthew

note: you are NOT repeating your content as you should be.


Offline

#7 2005-12-26 12:01:43

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: Front layout as back page?

well I repeated the content, and it’s not showing on the backpage, I repaeted the content with the tags but no joy. Not sure what I else I’m doing wrong.

For the else I entered the word “nothing” which does display, but if I replace that with the same content it displays the content twice

Last edited by sekhu (2005-12-26 12:10:10)

Offline

#8 2005-12-27 04:05:49

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Front layout as back page?

can you post your code again. Only the relavent parts this time though please :)

Matthew


Offline

#9 2005-12-27 08:15:46

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: Front layout as back page?

<code>
<txp:if_individual_article>

<div id=“about”>

<div id=“words”>About Me</div>
<p>Single, 25 years of age
<br /><strong>Like</strong> cocaine & travelling
<br /><strong>Hate</strong> elitists & the conceited
<br /><strong>Currently</strong> medicated for schizophrenia.</p>
<div id=“mypic”><img src=“http://cowinside.com/images/pictureofme.jpg” /></div>

<hr class=“clearer” />

<div id=“categories”>
<strong>Categories</strong><br />
<txp:category_list />
</div>

<hr class=“clearer” />

<div id=“latest”>
<strong>Recent Entries</strong><br />
<txp:recent_articles limit=“10” break=”<br />” sortby=“Posted” sortdir=“desc” />
</div>

</div> <!— close about —>
<hr class=“clearer” />

<div id=“amazon”>

<div id=“read”>
<strong>Read</strong>
<br /><txp:asv_amazon asin=“0552772178”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“seen”>
<strong>Seen</strong>
<br /><txp:asv_amazon asin=“B000BYA5GO”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“played”>
<strong>Played</strong>
<br /><txp:asv_amazon asin=“B000BHIQUS”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

<div id=“heard”>
<strong>Heard</strong>
<br /><txp:asv_amazon asin=“B0001M7P78”>
<a href=“asv_DetailPageURL”>asv_Title</a>
<br /><a href=“asv_DetailPageURL”><img src=“asv_SmallImageURL” /></a>
</txp:asv_amazon>

</div>

<txp:else />

nothing

</txp:if_individual_article>
</code>

So the word “nothing” displays on the front page, not on the back page, and the sidebar doesn’t show up on the backpage at all

Offline

#10 2005-12-27 14:06:39

squaredeye
Member
From: Greenville, SC
Registered: 2005-07-31
Posts: 1,495
Website

Re: Front layout as back page?

sekhu,
i’ve never used the url scheme you have working, which seems to include categories?
could you try an if category tag as well? otherwise, i am getting a bit stumped too, but that may have to do with the fact that its 6:00am and my son is fussy:), or that I can’t see the whole picture here.

slightly off topic, you may consider putting all your amazon stuff into a form, so that it cleans up your page? then output it into your page through a txp:output_form tag. ?

lastly, just symantics, but it’s front page and indiv. article page and category page (rather than back page).

maybe i can take a second look when ican sit down with my mac?

matthew


Offline

#11 2005-12-27 15:31:15

sekhu
Member
Registered: 2005-05-12
Posts: 428
Website

Re: Front layout as back page?

well i can wait, but as for the url structure i;m using non-messy urls. I agree with using forms, but this helps for me in regards to troubleshooting and seeing what’s what.

i;m working on my other site so i wont’ get bored waiting, and I’ll see if I can try the if category method as well

Offline

Board footer

Powered by FluxBB