Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2014-08-10 10:47:51
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Thumbnail Gallery
Hi
I’m new to this and trying to make a website for a community gallery. I want to make an artist page where if you go to “write” enter the title, body text and images it will automatically create a page for that artist and take a thumbnail of one of the images with the artist name and add it to an artist index page… preferably in alphabetical order and mobile friendly. I’ve just been trying to add this to a copy of the default page setup and am using the hive admin if that makes any difference. A category for artists in images is set up with create thumbnail selected.
This is probably a really basic thing but I have been trying for awhile now with little success. Any help would be greatly appreciated.
Cheers
Offline
Re: Thumbnail Gallery
Hi Joe and welcome to txp.
What you describe can easily be done in txp. Please tell us what code you are using now for your site so as to guide you as to what needs to be added.
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 2014-08-11 06:57:13
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Re: Thumbnail Gallery
<!doctype html>
<html lang="<txp:lang />">
<head>
<meta charset="utf-8">
<!-- page title and metas, no meta keywords as they are now obsolete -->
<title><txp:page_title /></title>
<meta name="description" content="">
<meta name="generator" content="Textpattern CMS">
<meta name="robots" content="noindex, follow, noodp, noydir">
<!-- mobile viewport optimised, more info: http://h5bp.com/viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<txp:if_individual_article>
<!-- add meta author for individual articles -->
<txp:meta_author title="1" />
</txp:if_individual_article>
<!-- content feeds -->
<txp:feed_link flavor="atom" format="link" label="Atom" />
<txp:feed_link flavor="rss" format="link" label="RSS" />
<txp:rsd />
<!-- specify canonical, more info: http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html -->
<txp:if_individual_article>
<link rel="canonical" href="<txp:permlink />">
<txp:else />
<link rel="canonical" href="<txp:section url='1' />">
</txp:if_individual_article>
<!-- css -->
<!-- Google font API (remove this if you intend to use the theme in a project without internet access) -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Serif:n4,i4,n7,i7|Cousine">
<txp:css format="link" media="" />
<!-- or you can use (faster) external CSS files eg. <link rel="stylesheet" href="<txp:site_url />css/default.css"> -->
<!-- HTML5/Media Queries support for IE < 9 (you can remove this section and the corresponding 'js' directory files if you don't intend to support IE < 9) -->
<!--[if lt IE 9]>
<script src="<txp:site_url />js/html5shiv.js"></script>
<script src="<txp:site_url />js/css3-mediaqueries.js"></script>
<![endif]-->
</head>
<body id="<txp:section />-page">
<!-- header -->
<header role="banner">
<hgroup>
<h1><txp:link_to_home><txp:site_name /></txp:link_to_home></h1>
<h3><txp:site_slogan /></h3>
</hgroup>
</header>
<!-- navigation -->
<nav role="navigation">
<h1><txp:text item="navigation" /></h1>
<txp:section_list default_title='<txp:text item="home" />' include_default="1" wraptag="ul" break="">
<li<txp:if_section name='<txp:section />'> class="active"</txp:if_section>>
<txp:section title="1" link="1" />
</li>
</txp:section_list>
</nav>
<div class="wrapper">
<div class="container">
<!-- left (main) column -->
<div role="main">
<txp:if_article_list><h1><txp:section title="1" /></h1></txp:if_article_list>
</div> <!-- /main -->
<!-- footer -->
<footer role="contentinfo">
<p><small><txp:text item="published_with" /> <a href="http://textpattern.com" rel="external" title="<txp:text item='go_txp_com' />">Textpattern CMS</a>.</small></p>
</footer>
<!-- JavaScript at the bottom for fast page loading, more info: http://developer.yahoo.com/performance/rules.html#js_bottom -->
<!-- add your own JavaScript here -->
</body>
</html>
Offline
#4 2014-08-11 06:59:58
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Re: Thumbnail Gallery
So thats the code from the page I would like to change. Its a copy of the default page minus some stuff. I was trying to post it inside a scroll box by adding bc.. but it didn’t work for me. Sorry, this must be really painful for you all.
Offline
#5 2014-08-11 11:20:03
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Thumbnail Gallery
Hi JoeJoe, you’ve removed some essential parts, the most important one being the <txp:article />
tag. Put it in your main column section (and close the two divs “wrapper” and “container”) and see how far that gets you. Don’t hesitate to post your questions here :)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#6 2014-08-12 00:45:10
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Re: Thumbnail Gallery
<div class="wrapper">
<div class="container">
<!-- left (main) column -->
<div role="main">
<txp:article_custom pgonly="0" section="artists" status="4" />
<txp:images category="artists" thumbnail="1" />
</div> <!-- /main -->
</div> <!-- /.container -->
</div> <!-- /.wrapper -->
Hey Uli and colak thanks for the replys. So added that and now there are thumbnails displayed which is progress! Learning’s fun isn’t it? What would be the next step? Something to do with custom article list?
{Edited to add Textile’s bc.
for better code display – Uli}
Last edited by uli (2014-08-12 16:20:55)
Offline
#7 2014-08-12 16:17:54
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Thumbnail Gallery
JoeJoe wrote #282818:
What would be the next step? Something to do with custom article list?
Depends on what you want to achieve. Most probably you want images depending on the article (i.e. artist), but at the moment your images tag is applied globally, outside article context. What’s the code inside your form “default”, is there already any kind of image tag? (Remember: form “default” is called when you don’t call a specific form with your article tag.)
Is your site online yet so we could have a look?
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#8 2014-08-13 00:44:22
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Re: Thumbnail Gallery
Yes. So this is the new site http://josephbenfranklin.com/ and this is the old one http://www.serpentinearts.org/ the new one will move to the old domain name when it’s ready.
From what I understand for each Artist there needs to be article? This article should only be accessible through an index section with names and thumbnails (not on the front page or separate pages). The way I was trying/failing was to have one thumbnail associated with each artist taken and used to make an index…. now I see it would probably be more like creating an article first for each artist with a thumbnail then the index. Is there anyway to set up an action to take the artists from the old site? Thanks for your patience
Last edited by JoeJoe (2014-08-13 00:44:55)
Offline
Re: Thumbnail Gallery
JoeJoe wrote #282860:
From what I understand for each Artist there needs to be article? This article should only be accessible through an index section with names and thumbnails (not on the front page or separate pages). The way I was trying/failing was to have one thumbnail associated with each artist taken and used to make an index…. now I see it would probably be more like creating an article first for each artist with a thumbnail then the index. Is there anyway to set up an action to take the artists from the old site? Thanks for your patience
Yes, one artist/article would be a good way and an article_list section="artists"
would display names/thumbnails with the right tags. Something like:
<txp:if_section name="artists">
<txp:article_image /><br />
<txp:permlink><txp:title /></txp:permlink>
</txp:if_section>
The code above assumes that you would make use of the article_image field. Do take a look at the tag reference for more info.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#10 2014-08-22 05:46:03
- JoeJoe
- New Member
- Registered: 2014-08-10
- Posts: 6
Re: Thumbnail Gallery
Thanks colak
Offline
Pages: 1