ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

problem with title_permalink

November 10, 2010 10:49am

Subscribe [4]
  • #1 / Nov 10, 2010 10:49am

    Alli

    158 posts

    I am using the following code to show the most viewed entries in a number of weblogs:

    <ul>
    {exp:weblog:entries weblog="hoodies|mugs|tshirts|cards" limit="8" dynamic="off" rdf="off" sort="desc" orderby="view_count_one"}
     <li> <span class="top_picks_title"><a href="http://{title_permalink=/{weblog_short_name}/item}">{title} -</a></span>
    {package_type}
    </li>
     {/exp:weblog:entries}
    </ul>

    The links, however are not working they are displaying as:

    <a href="https://domainname.co.uk/{title_permalink=/template/item}">https://domainname.co.uk/{title_permalink='/template/item'}</a>

    Any suggestion as to what I am doing wrong?

    Thanks

  • #2 / Nov 11, 2010 5:51am

    John Henry Donovan

    12339 posts

    Alli,

    What version and build of EE are you using?

    is your global variable {weblog_short_name} defined as “template”?
    Does it match a template group name?
    If you hardcode the template group name in there does it work?

    <a href="http://{title_permalink=template/item}">{title} -</a>
  • #3 / Nov 11, 2010 6:14am

    Alli

    158 posts

    Hi John

    I am using EE 1.7.0 build: 20101018
    The weblog_short_name is the same as the template name
    Yes, when I hard code the template name the link works okay.

  • #4 / Nov 11, 2010 4:39pm

    Ingmar

    29245 posts

    Does something like that work, too?

    {assign_variable:foo="template"}
    
    ...
    
    <a href="http://{title_permalink={foo}/item}">{title} -</a>
  • #5 / Nov 12, 2010 11:46am

    Alli

    158 posts

    Hi Ingmar

    It’s okay, I have decided to just set each weblog separately and list the top two items in each one. So I can set the title_permalink without using the {weblog_short_name}

    Thanks for your help.

  • #6 / Nov 12, 2010 5:28pm

    Sue Crocker

    26054 posts

    Glad Ingmar was able to help. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases