Results 1 to 9 of 9

Thread: Linking PDFs to Albums via Theme?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default A few more thoughts

    I agree that the IF condition can only test whether a field is empty or not. I tried to pull the content from the OrangeCD tag into a variable but was not successful. My plan was to then use a script to evaluate the content.

    You could edit the theme to make the file name something other than "Notes.PDF," but the restriction is that it has to be the same file name for all albums so that the link that the template displays on the album page works. Remember that if having the direct link is not important to you, you can put any PDF file (and multiple ones at that) into the album's media folder and open a file from the list after clicking on "View Files."

    The folder where OrangeCD is installed includes the "daxedit.exe" program, which can be used to edit themes. (You can also open the theme with any text editor to edit it, such as Notepad.) After starting daxedit, the right panel shows all of the tags (i.e., database fields) that are available, which is helpful to figure out how to refer to these tags in code.

  2. #2
    Join Date
    Oct 2006
    Location
    Posts
    304

    Default

    You can also create a custom field to use as the IF field if you don't want to use an existing OCD field such as Condition. You can also add Charles' dax to the track page if you want to access the liner notes from there also.

  3. #3
    Join Date
    Oct 2006
    Location
    Posts
    304

    Default

    I have found a little hitch in this. If the path has an apostrophe in it (as in C:\Albums\O'Farrill) then the dax won't work. This is different from the way Play and Queue work as they both allow an apostrophe in the path. I don't know enough to understand why this is the case.

  4. #4

    Default

    The forum replaces ": p" with a smiley icon, so in the below code, replace the icon with : p (no space between : and p).

    Replace
    <a href='<daxath/>'>View Files</a>
    and
    <a href='<daxath/>\Notes.pdf'><dax:condition/></a>

    with
    <a href="<daxath/>">View Files</a>
    and
    <a href="<daxath/>\Notes.pdf"><dax:condition/></a>

    and it will work with paths that include an apostrophe. Not sure why.
    Last edited by Charles_Litton; 05-27-2014 at 03:05 AM.

  5. #5
    Join Date
    Oct 2006
    Location
    Posts
    304

    Default

    Thanks, Charles. That works.

Posting Permissions

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