first of al: I'm a total noob if it comes to php (so you know :P)
Now I'm building a website where users can download a lot of (self-made) songs (and their tabs, sheets, music, midi, etc.) and to prevent myself from coding the download links for every song I thought it would be easier to create a module that automatically adds the download links.
What I want to do is this:
I want to create a module which contains code which is roughly like this:
Code: Select all
<a href="/download/songs/song-title/song-title.mp3">download mp3</a>
<a href="/download/songs/song-title/song-title_guitar.pdf">download tabs</a>
<a href="/download/songs/song-title/song-title_music.pdf">download music</a>
Now I have my songs as Joomla articles and I want to write this code in php, so that the text "song-title" is replaced by the Alias of the article.
So for example: I have a song called "My First Joomla Experience" and I made an article with the songtext and the alias "my-first-joomla-experience" and the filename of the mp3 is "my-first-joomla-experience.mp3", thus the result of the code should be:
Code: Select all
<a href="/download/songs/my-first-joomla-experience/my-first-joomla-experience.mp3">download mp3</a>
<a href="/download/songs/my-first-joomla-experience/my-first-joomla-experience_guitar.pdf">download tabs</a>
<a href="/download/songs/my-first-joomla-experience/my-first-joomla-experience_music.pdf">download music</a>

Thx for any help ..
ps: A link to a tutorial where I could learn exactly this would do too (I've been searching, but don't really understand what I should be searching for yet
