Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2009-05-02 05:58:30

miksu
Member
Registered: 2009-05-02
Posts: 17

Forms proplem.

I am txp noop. And I don´t know how use forms. I want use form “single” but I don´n know how.
This is my template 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” />

<title>miksula v.2</title>

<link rel=“home” href=”<txp:site_url />” />

<txp:feed_link flavor=“atom” format=“link” label=“Atom” /> <txp:feed_link flavor=“rss” format=“link” label=“RSS” />

<txp:css format=“link” />

<txp:rsd />
</head>
<body id=”<txp:if_section name=”“>front<txp:else /><txp:section /></txp:if_section>”>

<!— accessibility —>
<div id=“accessibility”>

</div>

<div id=“container”>

<!— head —> <div id=“head”>

<p id=“site-slogan”><txp:site_slogan /></p> </div>

<!— left —> <div id=“sidebar-1”>
<span style=“padding:0px;font-weight:bold;”>Navigaatio</span><br />
<br />
<a href=“index.php”>>Etusivu</a><br />
<a href=“index.php”>>Etusivu</a><br />
<a href=“index.php”>>Etusivu</a><br />
<a href=“index.php”>>Etusivu</a><br />

</div>

<!— right —>

<!— center —> <div id=“content”>
<txp:if_category> <h2><txp:category title=“1” /></h2>

<div class=“hfeed”>

</div>
<txp:else /> <txp:if_search> <h2><txp:text item=“search_results” />: <txp:page_url type=“q” /></h2>

<div class=“divider”><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” alt=”—-” title=”“ /></div> </txp:if_search>

<div class=“hfeed”> <txp:article form=“single” listform=“default” /> </div>
</txp:if_category>

<txp:if_individual_article>

</txp:if_individual_article>

</div>

<!— footer —> <div id=“foot”>© miksula 2009 </div>

</div>

</body>
</html>

Sorry my poor english. :)

Offline

#2 2009-05-02 06:56:16

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,091
Website GitHub Mastodon Twitter

Re: Forms proplem.

What do you have in your default form?

Although you seem to indeed call your ‘single’ form correctly in your article tag, there might be a conflict with what is happening in your listform.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2009-05-02 17:32:38

miksu
Member
Registered: 2009-05-02
Posts: 17

Re: Forms proplem.

<txp:if_individual_article>
<h1 class=“entry-title”><txp:permlink><txp:title /></txp:permlink></h1>
<txp:else />
<h3 class=“entry-title”><txp:permlink><txp:title /></txp:permlink></h3>
</txp:if_individual_article>

<p class=“published”><txp:posted /></p>

<div class=“entry-content”>
<txp:body />
</div>

<address class=“vcard author”> <span class=“fn”></span></address>

<p class=“tags”><txp:category1 title=“1” link=“1” /> <txp:category2 title=“1” link=“1” /></p>

<txp:comments_invite wraptag=“p” />

<div class=“divider”><img src=”<txp:site_url />images/1.gif” width=“400” height=“1” alt=”—-” title=”“ /></div>

That is form default.

Offline

#4 2009-05-03 15:07:27

miksu
Member
Registered: 2009-05-02
Posts: 17

Re: Forms proplem.

I need help. :(

Offline

#5 2009-05-03 15:39:42

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

Re: Forms proplem.

What is it exactly that doesn’t work? The article tag on your page as it is now:

<txp:article form="single" listform="default" />

will display an individual article using form ‘single’ and article lists using form ‘default’. If both forms exist, it should work. So can you please describe what you expect it to do (and what it doesn’t do)?

Offline

#6 2009-05-03 15:49:39

jsoo
Plugin Author
From: NC, USA
Registered: 2004-11-15
Posts: 1,793
Website

Re: Forms proplem.

Is what you posted above your entire default page? (You may want to read how to post code and tags in this forum and how to post a tag trace.) A tag trace of a page that is not behaving how you expect would be helpful.

As colak said, what you have looks as though it should call the “single” form when you are on an individual article page. Are you sure that you have looked at such a page? (In a new Txp install, this would be a page such as http://my.website/articles/1/welcome-to-your-site.)

If what you have posted is indeed your entire default page, you have probably removed more tags than you should. For example, your page will not show anything on a category list page (e.g., http://my.website/category/cat1 or http://my.website/?c=cat1, depending on your URL mode).


Code is topiary

Offline

#7 2009-05-03 16:43:34

miksu
Member
Registered: 2009-05-02
Posts: 17

Re: Forms proplem.

I want do article page where ere not comments. :(
Sorry my poor english.
Link to my test article:
http://miksu.viuhka.fi/Sivut/3/muuu

Last edited by miksu (2009-05-03 16:45:49)

Offline

#8 2009-05-03 16:49:14

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Forms proplem.

In TXP’s Preferences turn Auto-append comments to articles setting off.

After that, you can manually include, or not, comment form / comments to articles just by outputting comments_display form to article context.

PS. it’s best practice not to use capital letters in section and category names (e.g. _S_ivut).

Last edited by Gocom (2009-05-03 16:51:00)

Offline

#9 2009-05-03 16:59:09

miksu
Member
Registered: 2009-05-02
Posts: 17

Re: Forms proplem.

Gocom näytät osaavan suomea. Kun laitan kommentit pois niin tulee teksti “Tämän artikkelin kommentointi on päättynyt”

Offline

#10 2009-05-03 18:11:19

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Forms proplem.

miksu wrote:

Gocom näytät osaavan suomea. Kun laitan kommentit pois niin tulee teksti “Tämän artikkelin kommentointi on päättynyt”

Yes, it does. If you close the commenting for a single article, and you are still appending the commenting form to the article, TXP will show the message, instead of the form. But, if you do not append the comments automatically in the articles, then it won’t show the message, but instead you can manually deside what to append to the articles and what not, and where.

Thus, you should turn auto-appending off in Admin > Prefs, and after that, if you want to include comments in some articles, or article forms, include them manually to the form / context with <txp:output_form form="comments_display" />.

Offline

#11 2009-05-05 16:27:03

miksu
Member
Registered: 2009-05-02
Posts: 17

Re: Forms proplem.

But I have two layot:
Normal Article layot and Page article layot.
I want that Page layout not have comments but how?

Offline

#12 2009-05-05 17:12:53

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

Re: Forms proplem.

I think you need to remove this from your ‘default’ form:

<txp:comments_invite wraptag="p" />

Last edited by els (2009-05-05 17:13:19)

Offline

Board footer

Powered by FluxBB