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 - issue linking to pdf file

Development and Programming

D. Shun-Luoi Fong's avatar
D. Shun-Luoi Fong
75 posts
16 years ago
D. Shun-Luoi Fong's avatar D. Shun-Luoi Fong

I’m not certain this is a Structure module issue, but I am using Structure pretty heavily and figured this may be a good place to start…

I have a weblog called “resources” that has static content, and an entry in “resources” that is a listing for the “fact-sheets” weblog. Both “resources” and “fact-sheets” are managed by structure. The default template for “fact-sheets” is resources/fact-sheets. In my entry in “resources” for the fact sheets listing, I have the following Structure settings:

Structure uri: fact-sheets (so I have url of domain.com/resources/fact-sheets) Parent: Resources Template: resources/fact-sheets Listing: checked Weblog: Fact Sheets

In my “fact-sheets” weblog I have the following fields (in addition to the normal title/url title): sm_cf_fs_included_topics: this is a text input field that lists topics included in the fact sheet sm_cf_fs_pdf: this is the name of the pdf, i.e. name-of-fact-sheet.pdf

In my resources/fact-sheets template I have the following code:

<ol>
    {exp:weblog:entries weblog="fact-sheets" sort="asc" orderby="date" disable="categories|member_data|trackbacks" dynamic="off"}
        <li><a href="/media/pdf/resources/fact-sheets/{sm_cf_fs_pdf}" title="{title}">{title}</a>
            {if sm_cf_fs_included_topics}
<span><strong>Included Topics:</strong> {sm_cf_fs_included_topics}</span>{/if}
        </li>
    {/exp:weblog:entries}
    </ol>

So if someone wants to view a given fact sheet, they click on the link which links directly to the pdf file instead of going to some page of a weblog entry. However, when I click on the link to view the pdf, it just displays the home page of my site. The url says it is the pdf, i.e. “domain.com/media/pdf/resources/fact-sheets/name-of-fact-sheet.pdf”. Am I doing something wrong in Structure that causes this to happen…or is this an EE issue I need to deal with?

       
D. Shun-Luoi Fong's avatar
D. Shun-Luoi Fong
75 posts
16 years ago
D. Shun-Luoi Fong's avatar D. Shun-Luoi Fong

I’m an idiot…wish I could delete this post. I hadn’t even uploaded the pdf’s to the server…hard to open a pdf when there is no file there to open. :red:

This is a good sign to call it a day and go get some fresh air.

       

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.