Welcome Guest, Not a member yet? Register   Sign In
Url text displays true but hide link display wrong
#1

[eluser]greedyman[/eluser]
In the home page, I click a category link (in category page) and then click product link (in product details page). In the category page, any link is normal but in the product page, I have a menu as below:

Code:
<div class="crumb_nav">
        <a href="&lt;?php base_url(); ?&gt;">Home</a> &gt;&gt; &lt;!-- home page --&gt;
        <a href="&lt;?php echo $category-&gt;name; ?&gt;"> &lt;!-- category page --&gt;
            &lt;?php echo $category->name; ?&gt;
        </a> &gt;&gt;
        &lt;?php echo $product->name; ?&gt; &lt;!-- product details page --&gt;
    </div> &lt;!-- end .crum_nav --&gt;

All hide links above are the same when I click any link from category page (in href of a tag) but display name in &lt;?php ?&gt; tag is normal. Example:

Quote:// menu display
Home >> Fruits and vegetables >> apple
// but all hide links are the same
localhost/dpfoods/fruits-and-vegetables/apple-25

Have anyone know what's problem? Thanks so much!
#2

[eluser]Eduard Stankovic[/eluser]
you are missing echo

Code:
<div class="crumb_nav">
        <a href="&lt;?php echo base_url(); ?&gt;">Home</a> >> &lt;!-- home page --&gt;
        <a href="&lt;?php echo $category-&gt;name; ?&gt;"> &lt;!-- category page --&gt;
            &lt;?php echo $category->name; ?&gt;
        </a>  >>
        &lt;?php echo $product->name; ?&gt; &lt;!-- product details page --&gt;
    </div> &lt;!-- end .crum_nav --&gt;

maybe thas is problem ... if not .. try to describe your problem more
#3

[eluser]greedyman[/eluser]
[quote author="Eduard Stankovic" date="1362322405"]you are missing echo

Code:
<div class="crumb_nav">
        <a href="&lt;?php echo base_url(); ?&gt;">Home</a> >> &lt;!-- home page --&gt;
        <a href="&lt;?php echo $category-&gt;name; ?&gt;"> &lt;!-- category page --&gt;
            &lt;?php echo $category->name; ?&gt;
        </a>  >>
        &lt;?php echo $product->name; ?&gt; &lt;!-- product details page --&gt;
    </div> &lt;!-- end .crum_nav --&gt;

maybe thas is problem ... if not .. try to describe your problem more[/quote]

Thanks but I when repaired it, the problem is still. All hide links is still the same, I don't know why. Should I name URI?
#4

[eluser]Eduard Stankovic[/eluser]
show me your output .... after render Smile ...

Code:
<div class="crumb_nav">
        <a href="&lt;?php base_url(); ?&gt;">Home</a> >> &lt;!-- home page --&gt;
        <a href="&lt;?php echo base_url($category-&gt;name); ?&gt;"> &lt;!-- category page --&gt;
            &lt;?php echo $category->name; ?&gt;
        </a> >>
        &lt;?php echo $product->name; ?&gt; &lt;!-- product details page --&gt;
    </div> &lt;!-- end .crum_nav --&gt;

what about this ... ?
put your category name as parameter to base_url() function Smile ... it generates full URL Smile
#5

[eluser]greedyman[/eluser]
[quote author="Eduard Stankovic" date="1362326712"]show me your output .... after render Smile ...

Code:
<div class="crumb_nav">
        <a href="&lt;?php base_url(); ?&gt;">Home</a> >> &lt;!-- home page --&gt;
        <a href="&lt;?php echo base_url($category-&gt;name); ?&gt;"> &lt;!-- category page --&gt;
            &lt;?php echo $category->name; ?&gt;
        </a> >>
        &lt;?php echo $product->name; ?&gt; &lt;!-- product details page --&gt;
    </div> &lt;!-- end .crum_nav --&gt;

what about this ... ?
put your category name as parameter to base_url() function Smile ... it generates full URL Smile[/quote]


Thanks! It worked.




Theme © iAndrew 2016 - Forum software by © MyBB