Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-02-21 21:59:42

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

A little confusion. How do i create a new page?

Hi there,

Im new to textpattern and im trying to get used to the structure and how things are organised. Ive got as far as changing the default page in terms of layout and styles using the pages and styles tabs

I understand that the pages tab essentially works as a html document and that the style is the css document. I understand that can assign different style files to different sections.

I have about something i cant work out though

Firstly how do i create a new page? what i want are links from my default page to other pages that i can control through textpattern? How do i do this? I see no option on the pages tab to create a new page.

Also can anyone suggest a link for a good overview of textpattern. I cant wrap my head around sections and pages and styles and how they’re all linked

thanks for any help

Last edited by elduderino (2006-02-21 22:06:57)

Offline

#2 2006-02-21 22:16:50

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

Re: A little confusion. How do i create a new page?

Firstly how do i create a new page? what i want are links from my default page to other pages that i can control through textpattern? How do i do this? I see no option on the pages tab to create a new page.

‘Copy page as:’ (below the ‘Save’ button). Then you can modify it.

Also can anyone suggest a link for a good overview of textpattern. I cant wrap my head around sections and pages and styles and how they’re all linked

Textpattern semantic model, see also the links on the bottom of the page.

Offline

#3 2006-02-21 22:24:28

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: A little confusion. How do i create a new page?

Hi there,

thanks for the info. So ive created a new page. So when i view site how do i get to this page? Do i have to physically create my own link in the html code on the default page to my newly created page or is there an automated way i can do this in textpattern?

Offline

#4 2006-02-21 23:10:47

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: A little confusion. How do i create a new page?

Hi elduderino.

Pages are different to sections.
Pages are linked to sections. There isnt an URL to get to get to a page template.

So, to use that new page you have created, you need to go to presentations -> sections and set the section you want to use that new page.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#5 2006-02-21 23:23:28

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: A little confusion. How do i create a new page?

aha! thankyou maniqui i understand!

now the only thing is now that ive got a url address for my newly created page how do i create links to it on my default page? do ihave to do this manually in the page template using my own code or is there an automated way in txp to do it?

Offline

#6 2006-02-21 23:48:43

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

Re: A little confusion. How do i create a new page?

Elduderino,
First, I love your screen name, and if I am into that whole “brevity thing, may I just call you the dude?”

Second, this may be better suited for the “How do I” section of the forum

Third, you can create links from your default “section” (which uses your default page to show its content) can be structured the same as a “static” site. You simply link to the other section ie:

<code>
<a href=”<txp:site_url />”>home</a>
<a href=”<txp:site_url />about”>about</a>
<a href=”<txp:site_url />the-big-lebowski”>the big lebowski</a>
</code>

etc.

and per Maniqui’s note, you’ll want to create those sections and specify which “page” they use.
Think of pages as the html and sections as the folder that holds that html.

Hope that helps,
have fun,

Matthew


Offline

#7 2006-02-22 00:01:13

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: A little confusion. How do i create a new page?

> ma_smith wrote:

Third, you can create links from your default “section” (which uses your default page to show its content) can be structured the same as a “static” site. You simply link to the other section ie:
<code>
<a href=”<txp:site_url />”>home</a>
<a href=”<txp:site_url />about”>about</a>
<a href=”<txp:site_url />the-big-lebowski”>the big lebowski</a>
</code>

That would work if you are using clean URLs, and it’s one of the many many many ways you can do things in TXP.

Also, you can try somehting like:

<code>
<ul>
<li><txp:link_to_home>home</txp:link_to_home><li>
<txp:section link=“1” title=“1” wraptag=“li” name=“about” />
<txp:section link=“1” title=“1” wraptag=“li” name=“the-big-lebowski” />
</ul>
</code>
.

That will output:

<code>
<ul>
<li><a href=“http://www.example.com”>home</a></li>
<li><a href=“http://www.example.com/about”>About us</a></li>
<li><a href=“http://www.example.com/the-big-lebowski”>The Big Lebowski</a></li>
</ul>
</code>

Think of pages as the html and sections as the folder that holds that html.

Cool explanation, Matthew! I like it!

Last edited by maniqui (2006-02-22 00:03:01)


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#8 2006-02-22 01:14:43

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

Re: A little confusion. How do i create a new page?

Manaqui, Good call. I always use clean and forget that others do not and how helpful the section tags are.

Good one.


Offline

#9 2006-02-22 09:22:07

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: A little confusion. How do i create a new page?

Hi!

Thanks for the posts guys, You’ve made it very easy for me to understand. Just a few things.

In your post Ma ( and yes you may call me The Dude! You gotta love Jeff Bridges in the Big Lebowski!) in the code you provided i take it that i put the url address where it says url in the code?! I just want to make sure.

And secondly to Manquini could i ask what a clean url is. Are there dirty ones aswell? I have searched for info on this but havent had much luck.

And lastly once ive created a new section and assigned a page/style template to it how do i view it other than creating a link to it on the default page using the methods mentioned above. Is there no way of viewing the new page independantly?

Thanks again for your time

james

Last edited by elduderino (2006-02-22 10:21:28)

Offline

#10 2006-02-22 10:42:11

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: A little confusion. How do i create a new page?

Hi there,

sorry to post again but im having a problem. Ive created a section called ‘about’ and created a new page for it. Ive then gone back to my default page and created a link to the new ‘about’ page using the following method:

<li><txp:link_to_about>about</txp:link_to_about><li>

when ive viewed the site the following error message is displayed where the link should be:

tag_error <txp:link_to_about> -> Textpattern Warning: unknown_tag

Any ideas why?

Offline

#11 2006-02-22 13:54:21

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

Re: A little confusion. How do i create a new page?

elduderino,
The tag <code><txp:site_url /></code> returns the url that you have supplied in your admin preferences.

I use it like this: <code><a href=”<txp:site_url />about-us”>About Us</a></code>

Which produces: <code><a href=“artiswork.org/about-us”>About Us</a></code> in the parsed html.

Make sense? Hope so.

M


Offline

#12 2006-02-22 15:31:03

elduderino
Member
From: Whitstable. south-East England
Registered: 2006-01-02
Posts: 175
Website

Re: A little confusion. How do i create a new page?

Hi Ma,

Thats great its working fine. Clear as a bell!

Thanks again for your help

james

Offline

Board footer

Powered by FluxBB