1 of 2
1
newbie question :)
Posted: 18 May 2008 10:18 AM   [ Ignore ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hello, I am checking out the tag module and the docs.
I need to get a idea about the basic principle.

I have this code here:

{exp:weblog:entries weblog="producten"}
    
<div class="link" style="background:{color}; width:119px; float:left; margin:15px 15px 15px 0;">
     <
div class="tl">
      <
div class="tr">
       <
div class="bl">
        <
div class="br">
         <
div class="rnd_content">
          <
a href="{title_permalink="site/product_detailpage"}<?=$lang?>">
           
{exp:tag:related_gallery_entries gallery="prod_img"}
            
<img src="{thumb_url}" width="99px" height="99px" border="0"/>
           
{/exp:tag:related_gallery_entries}
          
</a>
          <
p style="font-size:8px; margin:0;">{title_prod_<?=$lang?>}</p>
          
{!-- end rnd_content --}</div>
        
{!-- end br --}</div>
       
{!-- end bl --}</div>
      
{!-- end tr --}</div>
     
{!-- end tl--}</div>
    </
div>
   
{/exp:weblog:entries}

I want to one of the related pictures (related with a tag) from the gallery in a thumb. When they contenue by clicking the thumb the whole article from the weblog is shown and I want to have all the images related to the weblog article visible. Is there a way to do that properly?

(This doesn’t do anything by the way smile)

Profile
 
 
Posted: 18 May 2008 10:41 AM   [ Ignore ]   [ # 1 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

This is the product detail page that comes after the above example.
This code probably also doesn’t make sense icm the tag module. But maybe it gives a better idea of the functionality I am looking for.

{exp:weblog:entries weblog="producten" disable="member_data|trackbacks"}
        {exp
:tag:related_entries weblog="producten"}
     
<div style="background:#e6e6e6 url(http://www.terraleisuregroup.com/images/left_content_grey_round.jpg) no-repeat top; margin:10px 0 0 0; padding-top:10px; ">
         <
div style="float:left;">
          <
a href="{image_url}" rel="lightbox" title="Full Image">
           <
img src="{medium_url}" width="400px" height="{medium_height}px" border="0" />
          </
a>
         </
div>
     
{/exp:tag:related_entries}
         
<div id="prod_information">
             <
h5 style="margin:0;">{title_prod_<?=$lang?>}</h5>  
             
{desc_prod_<?=$lang?>}
         
</div>
         <
div class="clearfloat"></div>
     </
div>
     <
div class="element_finish"></div>
     
{if logged_in}
     
<div style="background:#e6e6e6;">
      <
h5 style="margin-left:10px; margin-right:10px;">Hello {screen_name}, this information is only available to logged in members. Please handle with care</h5>
      <
p style="margin-left:10px; margin-right:10px;">{hidden_<?=$lang?>}</p>
     </
div>
     <
div class="element_finish"></div>
     
{/if}
   {
/exp:weblog:entries}

Profile
 
 
Posted: 19 May 2008 08:09 AM   [ Ignore ]   [ # 2 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hmm, is there someone that can answer my question. I find it hard to figure out how I can use this system. I did check the docs of course. But I would like to see some sort of tutorial. Can someone give me a hint on this problem so I can figure out how to do it?

I got this code now.

{exp:weblog:entries weblog="producten" disable="member_data|trackbacks"}
        {exp
:tag:related_gallery_entries gallery="prod_img"}
     
<div style="background:#e6e6e6 url(http://www.terraleisuregroup.com/images/left_content_grey_round.jpg) no-repeat top; margin:10px 0 0 0; padding-top:10px; ">
         <
div style="float:left;">
          <
a href="{image_url}" rel="lightbox" title="Full Image">
           <
img src="{medium_url}" width="400px" height="{medium_height}px" border="0" />
          </
a>
         </
div>
     
{/exp:tag:related_gallery_entries}
         
<div id="prod_information">
             <
h5 style="margin:0;">{title_prod_<?=$lang?>}</h5>  
             
{desc_prod_<?=$lang?>}
         
</div>
         <
div class="clearfloat"></div>
     </
div>
     <
div class="element_finish"></div>
     
{if logged_in}
     
<div style="background:#e6e6e6;">
      <
h5 style="margin-left:10px; margin-right:10px;">Hello {screen_name}, this information is only available to logged in members. Please handle with care</h5>
      <
p style="margin-left:10px; margin-right:10px;">{hidden_<?=$lang?>}</p>
     </
div>
     <
div class="element_finish"></div>
     
{/if}
   {
/exp:weblog:entries}

This code displays the related image now, so that’s at least something I got done. But it only displays one of the two related images. How come?

Profile
 
 
Posted: 19 May 2008 11:33 AM   [ Ignore ]   [ # 3 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Ok! Fixed the detailpage. Now the thumb page. Let me describe it. It’s a page containing weblog entries under a category. The weblog entries are nothing more but a link to the detail page. With the links I want to show a image that is the thumb. The code I use is like the one I use in the first post.

This code:

{exp:weblog:entries weblog="producten"}
<div class="link" style="background:{color}; width:119px; float:left; margin:15px 15px 15px 0;">
  <
div class="tl">
   <
div class="tr">
<
div class="bl">
  <
div class="br">
   <
div class="rnd_content">
<
a href="{title_permalink="site/product_detailpage"}<?=$lang?>">
  
{exp:tag:related_gallery_entries gallery="prod_img"}
   
<img src="{thumb_url}" width="99px" height="99px" border="0"/>
  
{/exp:tag:related_gallery_entries}
</a>
<
p style="font-size:8px; margin:0;">{title_prod_<?=$lang?>}</p>
{!-- end rnd_content --}</div>
  
{!-- end br --}</div>
{!-- end bl --}</div>
   
{!-- end tr --}</div>
  
{!-- end tl--}</div>
</
div>
   
{/exp:weblog:entries}

This doesn’t do anything and I can’t get information about how to do this. Someone out there that does know how to get this to work?

Thanks!

EDIT: ok, I got one picture like this:

{exp:weblog:entries weblog="producten"}
    {exp
:tag:related_gallery_entries gallery="prod_img"}
    {entries}
    {row}
    {exp
:weblog:category_heading}
    
<div class="link" style="background:{color}; width:119px; float:left; margin:15px 15px 15px 0;">
    
{/exp:weblog:category_heading}
      
     
<div class="tl">
      <
div class="tr">
       <
div class="bl">
        <
div class="br">
         <
div class="rnd_content">
          <
a href="{title_permalink="site/product_detailpage"}<?=$lang?>">
             <
img src="{thumb_url}" width="99px" height="99px" border="0"/>
           
           <
p style="font-size:8px; margin:0;">{title_prod_<?=$lang?>}</p>
          </
a>
          
{!-- end rnd_content --}</div>
        
{!-- end br --}</div>
       
{!-- end bl --}</div>
      
{!-- end tr --}</div>
     
{!-- end tl--}</div>
    </
div>
    
{/row}  
    {
/entries}
    {
/exp:tag:related_gallery_entries}    
   {
/exp:weblog:entries}

But I don’t get why it only shows one. There should be more.

Profile
 
 
Posted: 19 May 2008 12:04 PM   [ Ignore ]   [ # 4 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Dion,

What you’re trying to do with the Tag module here is not really how it was designed to be used. That’s why you are having trouble.

What you are trying to do is something that the Gallery Extended module is well suited for. Using GX2 you can related gallery images to blog entries and pull those images while in the context of a blog entry.

If you want to continue trying to use the Tag module for this, you should consider having a custom blog field that can hold a single ‘tag’. You can pass this ‘tag’ across to an embedded template which would in turn use the exp:tag:gallery_entries function to show the related image. A bit like this

{exp:tag:gallery_entries tag="{embed:tag}"}

To be sure, there is no tutorial for what you are trying to do. what you are trying to do is pretty advanced stuff that is beyond the normal usage of Tag.

Good luck though!

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 19 May 2008 12:18 PM   [ Ignore ]   [ # 5 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hello,

Thanks for the reaction.

Check this tread, that’s why I went for the tag module.

Are you saying it can’t be done with the tag module? If so I have to get the other one :(

I also have to say it’s working really well for the detailpage. And it’s easy to use for my client. Just give the image a tag and find the tag with the post. . . great. I only need the thumbs and it’s finished smile

Edit: The option you state is not as dynamic as the search function for the tags right? The user would have to remember exactly how the forum tag is written.

Profile
 
 
Posted: 19 May 2008 12:43 PM   [ Ignore ]   [ # 6 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

I’m not saying it can’t be done with Tag. Just challenging.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 19 May 2008 12:47 PM   [ Ignore ]   [ # 7 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hmm. probably. I am not sure about the custom field. That’s the only way? Or do you think there is another one? The problem with the custom field would be that it’s less user friendly I think. Is it better to use the gallery extension for this… If so I would have to consider buying that and stop wasting time. I will just forget about the tag module and use it for a future website or something.

Profile
 
 
Posted: 19 May 2008 12:49 PM   [ Ignore ]   [ # 8 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

One issue is that the concept of the Tag module is to have multiple tags per blog entry, indiscriminately. In order to pass the appropriate tag over to an embed template, which is always a best practice, and make sure THE image you want gets returned… it’s tricky.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 19 May 2008 12:51 PM   [ Ignore ]   [ # 9 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Ok, so I should get the gallery extension and stop this because it’s not the best way to go?

Profile
 
 
Posted: 19 May 2008 12:53 PM   [ Ignore ]   [ # 10 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  701
Joined  2004-03-30

Dion,

What sort of a deadline are you working on? Pie Man will be back tomorrow from holiday. He may have a slick little trick for you.

mk

 Signature 

Mitchell Kimbrough

Profile
 
 
Posted: 19 May 2008 12:56 PM   [ Ignore ]   [ # 11 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hmmm, this is the last thing I have to fix, I can wait a little longer. The deadline is the end of this week.
Thanks.

Profile
 
 
Posted: 20 May 2008 04:33 AM   [ Ignore ]   [ # 12 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Ok, now I see that there are more images related to an entry, but I didn’t relate them. All in all I think it’s best if I drop the tag module and go for the Gallery module.

Profile
 
 
Posted: 20 May 2008 07:32 AM   [ Ignore ]   [ # 13 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  3350
Joined  2006-10-18

Dion,

I apologize for the inconvenience oh oh

For the Tag:Related Gallery Entries loop to work, both the weblog entry and the gallery photo have to have a matching Tag. I’m not sure if that contributes to your issue.

I’m not sure what else you’re trying to do with your code, but I’m assuming what you’re after is native EE Photo Gallery display where you can force columns and rows?

If so, as Mitchell noted, you’ll have much better luck with Gallery Extended (GX). GX doesn’t have the rows="” or columns="” parameters, but fortunately, as of last week (which is why I’m so excited! LOL) we added the {count} variable, which you can easily set conditionals off of wink

With the exp:gallery_extended:entries loop, you can now do something like this:

<table width="593" border="0" cellspacing="0" cellpadding="10"><tr>
{exp:gallery_extended:entries gallery="{gallery_name}"}  
<td>
<
a href="{id_path=gallery/comments}"><img src="{thumb_url}" width="{thumb_width}" height="{thumb_height}" alt="{title}" /></a>
</
td>
{if count == "5"}</tr><tr>{/if}
{if count
== "10"}</tr><tr>{/if}
{if count
== "15"}</tr><tr>{/if}
{if count
== "20"}</tr><tr>{/if}
{
/exp:gallery_extended:entries}
</tr></table>

If you’d like to switch your purchase to GX from Tag, just let me know. For your trouble, I wont charge you the difference of $10 smile

I hope I’ve answered your issue here… if not, please let me know smile
I’m not sure if my brain hasn’t been working lately, but screenshots of what your after help too, haha LOL

 Signature 
Profile
 
 
Posted: 20 May 2008 11:01 AM   [ Ignore ]   [ # 14 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hi Pie man.

Thank you very much for the co-operation.
I will immediately check the gallery module. If I have some questions I hope I can discuss them with you smile

Profile
 
 
Posted: 20 May 2008 11:34 AM   [ Ignore ]   [ # 15 ]
Jr. Member
RankRank
Total Posts:  35
Joined  2008-05-16

Hi Guys, it’s probably just me but....  where are the installation instructions for the Gallery Extended module. I have a lot of folders so I think the general description doesn’t really apply… right?

Upload the module’s main folder into your EE site’s modules folder.
Upload the module’s language file into the appropriate sub-folder of your language folder.
Go to your Modules tab inside your EE control panel.
Find the module you uploaded in the list and click install.
Once installed, go into the module’s control panel and adjust any necessary settings.
Follow the module documentation on how to place the module’s tags into your templates.

I did this but it generates an error after I have installed the module and click it.

Edit: OK, I think I fixed it. Now I have to figure out how it works. Thanks!

Profile
 
 
   
1 of 2
1