Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2013-09-11 07:36:23

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: How to exclude image from article images list based on category?

Hi GugUser, hi Uli,
I know where the problem is: the js code for the image slider removes the style assigned by txp and substitutes it with its own style. When I remove the js code it does exactly what it is supposed to as in your example GugUser. It looks like Slide Viewer Pro is not a good solution, although it looks simple and elegant.
I have to look around for better image viewer. Could you advice me of one, please? I could be very basic: I only need it to have thumbnail navigation and resizable viewer window next to it (not overlay), all other features are optional.
Thanks, D.

Offline

#14 2013-09-11 21:37:20

etc
Developer
Registered: 2010-11-11
Posts: 5,062
Website GitHub

Re: How to exclude image from article images list based on category?

You’d better do it server-side anyway:

<txp:images limit="100" offset="1" wraptag="ul" class="fabric-gallery" break="li" >
	<txp:etc_query query='"<txp:image_info type=''category'' />"!="hidden"'>
		<txp:thumbnail />
	</txp:etc_query>
</txp:images>

Edit: smd_if could do it as well, I guess.

Last edited by etc (2013-09-12 19:24:01)

Offline

#15 2013-09-12 07:16:30

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: How to exclude image from article images list based on category?

Hi guys (and girls),
I decided on Galleriffic js for my presentation.
1. because I found a step by step tutorial how to implement it with TXP here:
http://txptips.com/galleriffic-image-gallery-without-any-plugins
This is an issue for me, since I have no knowllege of js.
2. because it doesn’t need any plugins, which makes it easier for me to keep track on what’s going on
3. because I have already tried this gallery once and it seemed to work then.

Well, it doesn’t now :-(.
Could you please have a look at what I have done and help me figure out what’s wrong?

Here is the url:
http://dorastamenova.com/salonpodjabloni/04_latky/44/bavlna

here is the Txp form used with
<txp:article/> tag:

Offline

#16 2013-09-12 07:20:11

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: How to exclude image from article images list based on category?

<div class="row">
   <div class="span924" itemDescription">
      <h1><txp:title/></h1>
<txp:section link="1" title="1" wraptag="h3" />      
   </div>
</div> <!--row-->

   <div class="span9">
      <p> <txp:body /></p>
      <p> Doporučujeme v kombinaci s těmito látkami a střihy:</p>
   </div>

<div class="row">
   <div class="span450">
      <txp:article_image escape="" thumbnail="0" height="450" width="300" />
   </div>
   <div class="span450 pull-left">
<!-- Start Advanced Gallery Html Containers -->
<div id="gallery" class="cont"> p.

   <div class="slideshow-container">
      <div id="loading" class="loader"></div>
      <div id="slideshow" class="slideshow"></div>
   </div>
   <div id="caption" class="caption-container"></div>
</div>

<div id="thumbs" class="navigation">
   <ul class="thumbs noscript">
      <txp:images break="" limit="100" offset="1" >
    	<li><a class="thumb" name="<txp:image_info type="name"/>" href="<txp:image_url />" title="<txp:image_info type="name" />"><img src="<txp:image_url thumbnail="1"  />" alt="<txp:image_info type="alt" />" /></a>
	   <div class="caption">
	      <div class="image-desc"><txp:image_info type="caption" /></div>
	   </div>
	</li>   
      </txp:images>	
   </ul>
</div>
   </div><!--span450-->
</div> <!--row-->

Offline

#17 2013-09-12 07:27:05

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: How to exclude image from article images list based on category?

Thanks for the advice, etc. I ma sure I’ll make use of it further on, but so far the exclusion based on css class seems to work, so I don’t want to complicate things before I get them work. It’s already complicated for me, anyway! Expresions like “server-side” still make me panic at this stage ;-)

Last edited by dorka (2013-09-12 07:29:14)

Offline

#18 2013-09-12 11:20:01

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: How to exclude image from article images list based on category?

You’ve no initialisation code in your source, see here, like at the bottom of that page’s source code.

dorka wrote:

and it seemed to work then.

Well, it doesn’t now :-(.

dorka, it’s always very helpful to describe what exactly doesn’t work so people trying to help you don’t have to do research.

And lastly: etc’s code is copy/paste ready as soon as you’ve installed and activated his etc_query plugin. What he meant with the “server side” remark is, that the query to the database (server side) excludes those images in your “hidden” category, not only the page’s CSS (client side).


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#19 2013-09-12 13:12:21

dorka
Member
Registered: 2012-10-04
Posts: 90

Re: How to exclude image from article images list based on category?

Thanks Uli, you’ve been really helpful again. I did include in the form a link to some js code, which I assumed was the initialization code, because this is what it said it was in the tutorial :-D. What is this code following right after the “Initialize Galleriffic” title in the article? Was it supposed to be pasted some place else or can I dismiss it all together? I know you’ve spent a lot of time with me, so please don’t answer if you don’t think its important.

Also, sorry for the poor description of the problem. I guess one think beginners (not only) in TXP have to learn – apart from coding skills, is to localize and properly describe problems.
Any way thanks again.

Last edited by dorka (2013-09-12 13:20:52)

Offline

#20 2013-09-12 21:58:10

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,305

Re: How to exclude image from article images list based on category?

Hey, the chooser is working after all :)

dorka wrote:

I did include in the form a link to some js code, which I assumed was the initialization code

Then I didn’t remark it (sorry) and it didn’t work for some reason.

What is this code following right after the “Initialize Galleriffic” title in the article?

That’s the initialisation code Jonathan has designed for his type of gallery presentation. It controls the behaviour of the gallery. You can copy it and alter/add to it til it suits your needs. Or you keep what you have now and change/add to these instructions. Just have a look at the parameters Gallerific offers (see Usage, 5.)

Was it supposed to be pasted some place else or can I dismiss it all together?

If you’d like to try it, it would replace the initialisation snippet you recently added to the end of the source code.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#21 2013-09-13 12:54:28

etc
Developer
Registered: 2010-11-11
Posts: 5,062
Website GitHub

Re: How to exclude image from article images list based on category?

uli wrote:

the query to the database (server side) excludes those images in your “hidden” category, not only the page’s CSS (client side).

It’s not exactly a db query, dear Uli, though the result is the same. Today is a nice day to read this tip. :)

Offline

Board footer

Powered by FluxBB