DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

help with html button

 3 Replies
 0 Subscribed to this topic
 19 Subscribed to this forum
Sort:
Author
Messages
New Around Here
Posts: 9
New Around Here

Hi,
Firstly I need to point out that i'm not very good at html and the back end of DNN, I just mainly use modules and insert text and images, but i'm trying to learn a bit more.
I'm using DNN 9.3.2
I am using a theme called Porto and is has some shortcoes that can be used.
I'm trying to make a button open up a pdf that I have on my server.

The shortcode is: 

< button class="btn btn-primary" type="button">Default Size

But how do i modify this code to open a pdf.


I have done it with a text link as followes:

 

< a href="/Portals/17/WorcesterPA%20Directions.pdf" target="_blank">Click here for location map and parking instructions

 

I have been trying to add the < a> tag inside the < button>tag but I just cant get it to work.

 

< button>Any ideas, i'm sure it something simple but it has me stumped...:(

Kind regards,
Matt

New Around Here
Posts: 9
New Around Here

ooops...the code that i pasted in has been changed into a button.....

How do i add the code so you can see it?

Sorry.

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By mattfarmer on 30 Apr 2020 12:57 PM

ooops...the code that i pasted in has been changed into a button.....

How do i add the code so you can see it?

Sorry.

type a space after any <

< a href...>

 

 

Senior Member
Posts: 1322
Senior Member
3 Helpful Replier
Helpful Replier
Thanks for being such a helpful replier!
Lifesaver
Lifesaver
You're Life Saver!
New Poster
New Poster
Congrats on posting!
3 Engaged Reader
Engaged Reader
You are an engaged reader!
Posted By mattfarmer on 30 Apr 2020 12:56 PM

Hi,
Firstly I need to point out that i'm not very good at html and the back end of DNN, I just mainly use modules and insert text and images, but i'm trying to learn a bit more.
I'm using DNN 9.3.2
I am using a theme called Porto and is has some shortcoes that can be used.
I'm trying to make a button open up a pdf that I have on my server.

The shortcode is: 

< button class="btn btn-primary" type="button">Default Size

But how do i modify this code to open a pdf.


I have done it with a text link as followes:

 

< a href="/Portals/17/WorcesterPA%20Directions.pdf" target="_blank">Click here for location map and parking instructions

 

I have been trying to add the < a> tag inside the < button>tag but I just cant get it to work.

 

< button>Any ideas, i'm sure it something simple but it has me stumped...:(

Kind regards,
Matt

Normally the styling depends on the CSS class not the type of element.
So

< a class="btn btn-primary" href="...">Open Pdf< /a>
Should work

 

 

These Forums are for the discussion of the open source CMS DNN platform and ecosystem.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
  2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
  3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  5. No Flaming or Trolling.
  6. No Profanity, Racism, or Prejudice.
  7. Site Moderators have the final word on approving / removing a thread or post or comment.
  8. English language posting only, please.

Would you like to help us?

Awesome! Simply post in the forums using the link below and we'll get you started.

Get Involved