We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Structure: create link for most read articles

Development and Programming

Interfacer's avatar
Interfacer
92 posts
16 years ago
Interfacer's avatar Interfacer

Hi, I have created a link list of “most read” articles. All working except the links.

{exp:weblog:entries status="kids|family" sort="desc" orderby="view_count_one" limit="5" dynamic="off"}
        <ul>
             <li><a href="#">{url_title}</a></li>
        </ul>
{/exp:weblog:entries}

The list is displayed on the index page pulling the items from three different sections (plus a couple of subsections). Now I want to link back to the initial article. I could use the {title_permalink=""} tag. The problem is that I have several “sections” in my website created with structure module. I could create links with conditionals but I can’t use segments, since the final weberver does not support segment feature. How could I create a dynamic link list?

Moved to Modules by Moderator

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
16 years ago
John Henry Donovan's avatar John Henry Donovan

Interfacer,

Take at look at the {comment_url_title_auto_path} variable

This variable is replaced by the URL set in the “Comment Page URL” preference under Admin > Weblog Management.

{exp:weblog:entries status="kids|family" sort="desc" orderby="view_count_one" limit="5" dynamic="off"}
        <ul>
             <li><a href="#">{comment_url_title_auto_path}</a></li>
        </ul>
{/exp:weblog:entries}
       
Interfacer's avatar
Interfacer
92 posts
16 years ago
Interfacer's avatar Interfacer

Included the tag. Problem is that my weblog includes three sections all with different url segments. If I assign a path in Admin > Weblog Management it would be only valid for one section. What I am after is something like {auto_path} for search results.

       
John Henry Donovan's avatar
John Henry Donovan
12,339 posts
16 years ago
John Henry Donovan's avatar John Henry Donovan

Interfacer

Problem is that my weblog includes three sections all with different url segments.

So you only have one weblog right? Can you give examples of the paths and segments you are tying to pull though?

I realise you are using the Structure module but let me see what your final goal is first before sending you to the modules authors for support.

       
Interfacer's avatar
Interfacer
92 posts
16 years ago
Interfacer's avatar Interfacer

Thanks John Yes, I have only one weblog. The weblog contains static pages created with structure. Within structure I have a normal document tree with three main sections and a couple of subsections within.

If i am using the suggested variable it doesn’t work because I basically can only target the weblog itself but not all the sections. I hope that makes more sense.

       
Interfacer's avatar
Interfacer
92 posts
16 years ago
Interfacer's avatar Interfacer

one possible url could be:

http://solidkids/solid_kids_section/about_bullying

where a another one could be:

http://solidkids/solid_schools/understanding_bullying_in_an_aboriginal_context/talking_about_bullying_in_an_aboriginal_context/

Thanks for helping

       
Sue Crocker's avatar
Sue Crocker
26,054 posts
16 years ago
Sue Crocker's avatar Sue Crocker

Interfacer, this does sound like a Structure issue. Moving to Modules for additional community support.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.