Results 1 to 12 of 12

Thread: How to use variable <%$tag%> at rows.html

  1. #1
    Join Date
    Nov 2008
    Posts
    92

    Default How to use variable <%$tag%> at rows.html

    I know that i can use the variable <%$tag%> at the browsetag.html, but i want to use at rows.html too.
    Do u have any tip to pass this variable to rows.html?
    Best Regards

  2. #2
    Join Date
    Mar 2009
    Posts
    143

    Default

    Hi, you need to use this variable
    HTML Code:
    <%$keywords|tag_format%>
    Hope this will work.

  3. #3
    Join Date
    Nov 2008
    Posts
    92

    Default Thanks pungky but...

    Thanks for your reply pungky!
    But <%$keywords|tag_format%> not work at rows.html. It works at browsetag.html but not at rows.html.

    I want to use only the tag word at my alt tag of the images links (for seo).
    At my rows.html i have a site print screen of each listing. In that image i want to use the same tag that was used in browsetag.html. The variable use at browsetag.html is <%$tag%> but this variable not working ( is empty!) at rows.html!

    How to pass this variable from browsetag.html to rows.html?
    Thanks in advance

  4. #4
    Join Date
    Mar 2009
    Posts
    143

    Default

    Hi,

    Could you send or copy the code of your rows.html here, we need to check it.

  5. #5
    Join Date
    Nov 2008
    Posts
    92

    Default

    The rows.html code is:
    Code:
    <%$hook_html_rows_begin%>
    
    <%if $sponsored%>
      <%include file="sponsored_rows.html"%>
    <%elseif $premium%>
      <%include file="premium_rows.html"%>
    <%else%>
    	<div class="link_rows">
    		<span><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></span>
        <%if $enable_bidding%>
          [<a href="<%$site_url%>/upgrade.php?pflag=retrieve&id=<%$link_id%>"><%t%>bid<%/t%></a> $<%$bid%>]
        <%/if%>
        <br />
        <%$description%>
        <br />
        <a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a> 
        - <a href="<%$site_url%>/<%$detail_page_url%>"><%t%>Detail<%/t%></a>
        <br /><span class="googlepr">Google PR <img src="<%$site_url%>/googlepr.php?link_id=<%$link_id%>"></span>
    	</div>
    <%/if%>
    
    <%$hook_html_rows_end%>
    I want to use at this file the variable <%$tag%>. But <%$tag%> it always empty! It´s work well at browsetag.html .... but not pass to rows.html.

    Waiting for your reply,

  6. #6
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    You can't use <%$tag%> in rows.html.

    From my understanding, you want to list the tags / keywords in rows.html which will be displayed in many pages such as category pages and search result.

    If so, you should use the following code to show the tag/keyword's of the link.
    Code:
    <%$keywords|tag_format%>
    In rows.html, it could be something like:
    Code:
    <%$hook_html_rows_begin%>
    
    <%if $sponsored%>
      <%include file="sponsored_rows.html"%>
    <%elseif $premium%>
      <%include file="premium_rows.html"%>
    <%else%>
    	<div class="link_rows">
    		<span><a href="<%$url%>" name="link_<%$link_id%>"><%$title%></a></span>
        <%if $enable_bidding%>
          [<a href="<%$site_url%>/upgrade.php?pflag=retrieve&id=<%$link_id%>"><%t%>bid<%/t%></a> $<%$bid%>]
        <%/if%>
        <br />
        <%$description%>
    
        <br />
        <%$keywords|tag_format%>
    
        <br />
        <a href="<%$url%>" name="link_<%$link_id%>"><%$url%></a> 
        - <a href="<%$site_url%>/<%$detail_page_url%>"><%t%>Detail<%/t%></a>
        <br /><span class="googlepr">Google PR <img src="<%$site_url%>/googlepr.php?link_id=<%$link_id%>"></span>
    	</div>
    <%/if%>
    
    <%$hook_html_rows_end%>

  7. #7
    Join Date
    Nov 2008
    Posts
    92

    Default

    You can't use <%$tag%> in rows.html.
    But is exactly that i want!
    There is no way to use(send) this variable at rows.html like we use at browsetag.html ?
    If u have an idea please let me know.

  8. #8
    Join Date
    Nov 2008
    Posts
    92

    Default browsetag.php

    At browsetag.php we have
    Code:
     $r = $dbConn->Execute("select distinct(tag) as tag from idx_tags where tag_path = '$tag'");
        $tag = $r->Fields('tag');
    Can we use this or implement a function or a global variable that pass the $tag to rows.html template file ?

  9. #9
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    The tag is populated from link's keyword. If you want to show the tag/keyword in rows.html, please use the code as I posted above.

    Code:
    <%$keywords|tag_format%>
    I may not understand your question here. Please show me a screenshot the result of <%$tag%> at the browsetag.html in the browser. I may can give better direction.

  10. #10
    Join Date
    Nov 2008
    Posts
    92

    Default See my image

    I made a graphic to explain what i want to do:


    What u think about it know? Is possible?

  11. #11
    Join Date
    Aug 2001
    Location
    Indonesia
    Posts
    3,732

    Default

    I see. It would be not possible without hacking the code.

    I have other suggestion. Why not use this code in rows.html:
    Code:
    <img src="<%image%>" alt="<%$keywords%>" />
    In browse by tag page, it will list the links with matched tag in the keyword. In this case, all links that contain word "flower". So in alt attribute still contain word 'flower'.

    I think it is better rather than having 10 images in rows have the same tag "flower".

  12. #12
    Join Date
    Nov 2008
    Posts
    92

    Default

    My alt attribute now is like that:

    Code:
    alt="Online Store <%$title%>,<%$keywords%>"
    In this case i have a lot of keywords inside of alt atribute that can be considered to be an unethical search engine optimization (SEO) technique.

    So i think for seo purpose it will better to have

    Code:
    alt="<%$tag%> Online Store, <%$title%>"
    I undertansd a litle bit of php development. Can u give me a single tip for start to implement that.
    Can i set a global variable at browsetag.php ?
    I find this piece of code that can help me
    Code:
    $r = $dbConn->Execute("select distinct(tag) as tag from idx_tags where tag_path = '$tag'");
        $tag = $r->Fields('tag');
    Best regards,

Similar Threads

  1. rating_img for rows.html
    By DGTALGOODIES in forum Help Wanted/Job Request
    Replies: 15
    Last Post: 02-14-2009, 01:32 AM
  2. html page question - Pulling variable
    By kosmo101 in forum v5.x
    Replies: 2
    Last Post: 02-28-2008, 10:16 AM
  3. Create variable to use in HTML
    By michaer in forum v5.x
    Replies: 1
    Last Post: 02-28-2007, 12:03 AM
  4. Rows.html
    By gspinney in forum v5.x
    Replies: 2
    Last Post: 12-20-2006, 10:18 PM
  5. rows.html v/s sp_cat_rows.html ??
    By ideavirus in forum v5.x
    Replies: 1
    Last Post: 06-22-2003, 07:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •