Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#781 2010-12-30 15:35:20
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: smd_gallery: super-flexible gallery generator
Hi
No it doesnt work.
<txp:smd_gallery category="?category" objectform="gallery">
{object}
</txp:smd_gallery>
It would be great if I was able to do this category="<txp:category />"
I am also trying out the 4.3 core tags but the funny thing is I achieved what i want with this
<txp:image_index />
<txp:image_display />
but it is limited
The link you gave me to the Jeff Soo gallery, its great but it’s a very bad doc. The javascript code is missing, tried copy it off from the source code and it wont work. Also <txp:image_list /> is outdated but i know it had been changed to <txp:images />
but I need you to tell me how to do this, just any example
if I am on the url like this
localhost/galley/?c=album1
localhost/galley/?c=album2
localhost/galley/?c=album3
I want to use the tag something like this
<txp:images category=”???” /> how can I make the category auto-detect the name of the category and display it, I have tried auto_detect=“images”, no clue what it is for.
Do I have to use < variable /> or something
Thanx
****
My point is, I need to make this flexible, the client must be able to create many categories as they like, the code had to be flexible so I dont have to keep coming back to code for them.
Last edited by Dimitri (2010-12-30 15:42:20)
<txp:way_too_cool />
Offline
#782 2010-12-30 15:45:18
Re: smd_gallery: super-flexible gallery generator
You can do: category="<txp:category />"
But you have to do it this way: category='<txp:category />'
When nesting TXP tags in TXP tags, you have to escape the quotes by using single quotes.
Offline
#783 2010-12-30 15:49:03
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: smd_gallery: super-flexible gallery generator
Bro, you came from nowhere to save me from 4 days of stress, I cant thank you enough.
I will get that in mind.
<txp:way_too_cool />
Offline
#784 2011-01-09 08:40:39
Re: smd_gallery: super-flexible gallery generator
I’m trying
<txp:smd_gallery category="animals" sublevel="all" limit="1" sort="random">
<a href="<txp:site_url />{title}"><img src="{url}" alt="{alt}" /></a>
</txp:smd_gallery>
but the {title}
attribute is not parsed. What I get is a link to the site url.
Can anybody spot what’s wrong with my code?
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#785 2011-01-09 09:16:17
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: smd_gallery: super-flexible gallery generator
Hi colak.
{title}
is for displaying the image caption. From when you upload the image, and you add some texts in the “Caption” textarea
I dont know what you are trying to achieve with your code. Try something like this, to open the image to an new window.
<txp:smd_gallery category="animals" sublevel="all" limit="1" sort="random">
<a href="{url}"><img src="{url}" alt="{alt}" /></a>
<p>{title}</p>
</txp:smd_gallery>
Last edited by Dimitri (2011-01-09 09:18:24)
<txp:way_too_cool />
Offline
#786 2011-01-09 09:27:57
Re: smd_gallery: super-flexible gallery generator
Hi dimitri,
Thanks for the reply
I am trying to link the image to a particular page not to itself.
What I expected to get is
<a href="http://mysite.tld/title"><img src="images/x.jpg" alt="my alt tag" width="230" height="300" /></a>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#787 2011-01-09 17:08:21
Re: smd_gallery: super-flexible gallery generator
colak wrote:
I am trying to link the image to a particular page not to itself.
What I expected to get is
<a href="http://mysite.tld/title"><img src="images/x.jpg" alt="my alt tag" width="230" height="300" /></a>
Shouldn’t it work with <txp:article_url_title />
since you’re calling the gallery from within an article?
…Prrrrrrrr…
Offline
#788 2011-01-09 18:16:12
Re: smd_gallery: super-flexible gallery generator
TNT wrote:
Shouldn’t it work with
<txp:article_url_title />
since you’re calling the gallery from within an article?
I’m not. I’m calling it from within a template. But I still don’t understand why {title}
is not parsed.
Last edited by colak (2011-01-09 18:17:22)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#789 2011-01-09 18:21:34
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: smd_gallery: super-flexible gallery generator
Like I said in my previous post, {title} merely outputs the text. It definitely will not work if you try make a link with this attribute.
<txp:way_too_cool />
Offline
#790 2011-01-09 19:16:52
Re: smd_gallery: super-flexible gallery generator
well the strange thing is that it seems that it is not parsed at all even when I use
<txp:smd_gallery category="animals" sublevel="all" limit="1" sort="random">
<txp:image id="{id}" />
<br />{title}
</txp:smd_gallery>
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#791 2011-01-09 22:09:40
- Dimitri
- Member
- From: Johannesburg
- Registered: 2010-10-31
- Posts: 129
Re: smd_gallery: super-flexible gallery generator
Make sure when you upload an image in the backend, you must add some texts in the “Caption” textarea.
It will be parsed, also wrap it around in <p> for the CSS.
<txp:way_too_cool />
Offline
#792 2011-01-09 22:19:08
Re: smd_gallery: super-flexible gallery generator
colak wrote:
well the strange thing is that it seems that it is not parsed at all even when I use
When you say ‘not parsed’, you mean that you see the actual string {title}
in the HTML output? That is weird. Do any of the other smd_gallery {}
substitutions get replaced with their equivalents? As Dimitri says, since smd_gallery v0.50, {caption}
and {title}
mean the same thing.
In your latest example, do you see images but no captions? What does the rendered HTML look like? Do you just see:
<img src="some_image" />
<br />
<img src="some_other_image" />
<br />
...
? I admit I don’t quite get what you’re doing. Are you uploading images and setting the image Caption to the url_title of an article so you can link to an article from an image?
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline