Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-01-22 12:48:39

yaform
Member
From: Lund, Sweden
Registered: 2005-11-03
Posts: 20
Website

The navbar as form

<p>Hello!</p>

<p>I trying to place the code for my navbar in a Form, only need to managing at one place, instead of at all “Pages” – but somehow, when I do so – everything beneath (the Posts and the Footer) jumps out of their place.</p>

<p>The navbar code – that i made an article Form named meny of (recalled in the Page) as <pre>
<code>&lt;txp:article form=“meny” /&gt;</code>
</pre> – looks like this</p>

<pre><code>&lt;ul&gt;
&lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/”&gt;Nyheter&lt;/a&gt;&lt;/li&gt; &lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/stegen”&gt;Stegen&lt;/a&gt;&lt;/li&gt; &lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/medlem”&gt;Medlem&lt;/a&gt;&lt;/li&gt;
&lt;li class=“page_item”&gt;&lt;a href=“http://www.vsq.se/foereningsinfo”&gt;Föreningsinfo&lt;/a&gt;&lt;/li&gt;

<p>&lt;/ul&gt;</code></pre></p>

<p>I guess whats above does matter here – and thats following</p>

<pre>
<code>&lt;link rel=“stylesheet” href=“http://www.vsq.se/css/screen.css” type=“text/css” media=“screen” /&gt;
&lt;link rel=“stylesheet” href=“http://www.vsq.se/css/print.css” type=“text/css” media=“print” /&gt;
&lt;title&gt;&lt;txp:page_title /&gt;&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;div id=“wrap”&gt;
&lt;a href=”#content” title=“Skip to Content” class=“hide” accesskey=“s”&gt;Skip to Content »&lt;/a&gt;
&lt;div id=“header”&gt;
&lt;h5&gt;&lt;txp:link_to_home&gt;&lt;txp:site_slogan /&gt;&lt;/txp:link_to_home&gt;&lt;/h5&gt;
&lt;ul&gt;
&lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/”&gt;Nyheter&lt;/a&gt;&lt;/li&gt; &lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/stegen”&gt;Stegen&lt;/a&gt;&lt;/li&gt; &lt;li class=“home page_item”&gt;&lt;a href=“http://www.vsq.se/medlem”&gt;Medlem&lt;/a&gt;&lt;/li&gt;
&lt;li class=“page_item”&gt;&lt;a href=“http://www.vsq.se/foereningsinfo”&gt;Föreningsinfo&lt;/a&gt;&lt;/li&gt;

<p>&lt;/ul&gt;
&lt;hr class=“hide” /&gt;
&lt;/div&gt;
&lt;div id=“main”&gt;
&lt;div id=“content”&gt;
&lt;txp:article limit=3 /&gt;</code>
</pre></p>

<p>Anyone knows how to to?</p>

Last edited by yaform (2006-01-22 13:13:57)


all we need is some creactivism

Offline

#2 2006-01-22 13:14:44

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

Re: The navbar as form

I’m sorry yaform, I don’t understand the problem. When I look at http://www.vsq.se/ it looks okay to me.

It shouldn’t make any difference whether you put the actual navigation code on your page template, or put it in a form called ‘navbar’ and on the page call the form with <txp:output_form form="navbar" />.

edit: Ah, changing your post while I’m not looking ;) So you should use the right output tag.

Last edited by doggiez (2006-01-22 13:16:00)

Offline

#3 2006-01-22 13:34:27

yaform
Member
From: Lund, Sweden
Registered: 2005-11-03
Posts: 20
Website

Re: The navbar as form

Well – I loooove you. Thanx a bunch master doggiez!

so I was wrong at txp:article. Got to learn some here.


all we need is some creactivism

Offline

#4 2006-01-22 14:29:58

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

Re: The navbar as form

yaform wrote:

so I was wrong at txp:article. Got to learn some here.

Article forms are called with <txp:article />. In article forms you place the tags that say which parts of an article you want to display (<txp:body />, <txp:title /> etcetera). For these forms you need to set type: article.

Misc forms (that can basically contain anything else, like your navigation code) are called with <txp:output_form />. Set type: misc.

And of course there also are link, comment and file forms, each needing their own tags to call them ;)

Offline

#5 2006-01-22 21:05:08

yaform
Member
From: Lund, Sweden
Registered: 2005-11-03
Posts: 20
Website

Re: The navbar as form

As I said – thanx a lot – and – you are THE sigma.


all we need is some creactivism

Offline

Board footer

Powered by FluxBB