Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Change the default form
Hello
I want to change the “default” form because i want to have a blog and work section but both works different, so the default for the forms is “default”. I don´t care if i use “default” to work or blog, is possible that? i hope so…
i´m not working in the blog yet because i´m not sure if i can do this thing. I have “started” the work section, but i need to be sure about this issue if not i have to change the flow of the website.
Thanks again!
Seba
Sonríe | Smile . <txp:lover />
Offline
Re: Change the default form
Here is a couple of examples
They have the blog and the portfolio and both are differntes.
For example if you go to the porfolio in jaredigital you can clic in a thumb and this one open a “description” page.
Sonríe | Smile . <txp:lover />
Offline
Re: Change the default form
You can use any form you wish with the form attribute, or alternatively, use container tags. Reference for article tag
Offline
Re: Change the default form
Thanks!
Now i have done that but i need to add the excerpt (thumbs).
This is my code into pages
<txp:if_article_list>
<txp:if_search>
<h2>Search results</h2>
</txp:if_search>
</txp:if_article_list>
<ul id="portfolio">
<txp:article form='work' />
</ul>
and this is my form
<li>
<txp:permlink>
<h2>
<txp:title />
</h2>
<txp:body />
</txp:permlink>
</li>
This is working but now i don´t know how create a excerpt for the thumbs (should be the form that i have created) and when i click in the thumbs go to the detail paga (no excerpt). Like the websites that i put before.
Thanks
Sonríe | Smile . <txp:lover />
Offline
Re: Change the default form
Depends how you are using images. If you place the image in an article_image field, you can use the <txp:article_image />
tag like so:
<txp:permlink><txp:article_image thumbnail="1" /></txp:permlink>
Note the thumbnail=“1” – that sets the thumbnail to display as opposed to the large image.
Offline
Re: Change the default form
Now i don´t understand, sorry.
Look this is the section work
If you click in any thumb y go to the detail page but is the thumb again.
Really is not only the thumb, is the title, image and text.
May be i´m not explaining myself very well.
Thanks
Sonríe | Smile . <txp:lover />
Offline
#7 2009-10-08 13:06:57
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Change the default form
You seem to make use of the same form for article lists and individual articles. You can do so, no problem. But then inside your form you have to use a second arrangement of tags for the needs of your individual articles.
<txp:if_individual_article>
<!-- Single client mode here -->
<txp:else />
<!-- Client list mode here -->
<txp:if_individual_article>
Or you add a listform="your_list_form"
into the txp:article tag and arrange your list tags in a separate form.
And for the image problem, remember what Jonathan said:
Note the thumbnail=“1” – that sets the thumbnail to display as opposed to the large image.
Last edited by uli (2009-10-08 14:25:59)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Change the default form
I´m reading and reading and reading bur i don´t understand. Now i´m lost.
this have to be into pages, no?
<txp:if_individual_article>
<!-- Single client mode here -->
<txp:else />
<!-- Client list mode here -->
<txp:if_individual_article>
but i don´t understand what i have to put in place of <!— Single client mode here —> and <!— Client list mode here —>.
I remember what Jonathan said but i don´t understand too
I´m sure that is a stupid thing and i can´t see what is that.
Sorry to ask a lot :)
Thanks…
Last edited by sebatorresi (2010-04-29 17:24:50)
Sonríe | Smile . <txp:lover />
Offline
Re: Change the default form
Ok… now i think that i understand what you say i´ll try something hehehe.
I have to use two differents forms one for the preview of the work and another for the detail, no?
Sonríe | Smile . <txp:lover />
Offline
Re: Change the default form
Uli and Jonathan are trying to tell you, Sebastian, that to get different kind of views, you need to use different markup for individual articles and list pages.
this have to be into pages, no?
Pages, articles, forms — anywhere. It can be used where ever you want. A example:
<txp:article>
<txp:if_individual_article>
<txp:permlink><txp:article_image /></txp:permlink>
<txp:title />
<txp:body />
<txp:else />
<txp:permlink><txp:article_image thumbnail="1" /></txp:permlink>
<txp:permlink><txp:title /></txp:permlink>
<txp:body />
</txp:if_individual_article>
</txp:article>
If you use same markup for different article views, it will look the same, cause the markup is exactly same.
I remember what Jonathan said but i don´t understand too
Without using attribute thumbnail
, it will output the larger full-sized image. With it set to true it will output the thumbnail. Straight forward.
Offline
Re: Change the default form
Thanks so much!
The only problem is that the tumbnail isn´t showing.
The thumbnail image is created.
I think if you put this <txp:image id="4" />
the thumbnail tag have to show it, no? or i´m missing something?
Sonríe | Smile . <txp:lover />
Offline
#12 2009-10-08 15:44:12
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Change the default form
I’m pretty sure you want to output some article text, excerpt, article title etc. along with your image/thumbnail, right? So you should use the article_image tag. Please read about its attributes here and have a look at the examples given there, especially for the thumbnail attribute.
Edit: The main reason for using article_image is of course re-using your form ;)
txp:image would just output one certain image.
Last edited by uli (2009-10-08 15:48:36)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline