The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Make HTML widget appear on specific URLs

3 posters

Go down

Make HTML widget appear on specific URLs Empty Make HTML widget appear on specific URLs

Post by ioncube May 2nd 2011, 8:12 am

Respected sir,
I have a HTML widget installed in my sidebar; which I want to appear only on a specific URL; so is there any coding block that I envelop my widget code within it such that my widget appears only on a specific URL page.
For blogger there were many
Code:
</b:if>
commands. Is THERE SOMETHING SIMILAR FOR FORUMOTION
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by Beno May 2nd 2011, 10:28 pm

Theres not a forumotion tool for this apart from only showing a widget to a certain group eg. member, guest admin ect.

Your best get is to find some javascript code that will check the url for certain parts and only display if there is. Try Google Very Happy

Thanks,
Ben
Beno
Beno
Hyperactive

Male Posts : 3024
Reputation : 67
Language : English
Location : England

http://www.benwhitedesign.co.uk

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by ioncube May 3rd 2011, 1:00 am

looking for it....
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by ioncube May 3rd 2011, 7:54 pm

I am tired of looking; is Sir. BASE there he could atleast giv me a definite answer...
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by Gangstar15 May 3rd 2011, 8:00 pm

Hmm so you want it like that.
if the the url is https://help.forumotion.com/forum then widget will be shown and e.g if its https://help.forumotion.com/groups then it will be hidden (:
Gangstar15
Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by ioncube May 3rd 2011, 8:59 pm

yes....i want a widget only appear at my homepage...sort of tutorial widget which isn't needed always; just at homepage
ioncube
ioncube
Forumember

Male Posts : 279
Reputation : 41
Language : eng
Location : Pakistan

http://defencedog.blogspot.com/

Back to top Go down

Make HTML widget appear on specific URLs Empty Re: Make HTML widget appear on specific URLs

Post by Gangstar15 May 3rd 2011, 10:22 pm

Homepage = Forum index? (:
Give your widget a class or an ID (: and hide it with CSS

Code:
.widget class name {display: none;}

and try use this jQuery code:

Code:
<script>jQuery(document).ready(function(){
if (location.pathname=='/forum') {jQuery(function() {jQuery('.WIDGET CLASS NAME').addClass("widget-active");});};});
</script>

and try add this code to your CSS:
Code:
.widget-active {display: block !important;}
Gangstar15
Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum