The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Make HTML widget appear on specific URLs

View previous topic View next topic Go down

Make HTML widget appear on specific URLs

Post by ioncube on 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
Forumember

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

http://defencedog.blogspot.com/

Back to top Go down

Re: Make HTML widget appear on specific URLs

Post by Beno on 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
Hyperactive

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

http://www.benwhitedesign.co.uk

Back to top Go down

Re: Make HTML widget appear on specific URLs

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

looking for it....

ioncube
Forumember

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

http://defencedog.blogspot.com/

Back to top Go down

Re: Make HTML widget appear on specific URLs

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

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

ioncube
Forumember

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

http://defencedog.blogspot.com/

Back to top Go down

Re: Make HTML widget appear on specific URLs

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

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

Gangstar15
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

Re: Make HTML widget appear on specific URLs

Post by ioncube on 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
Forumember

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

http://defencedog.blogspot.com/

Back to top Go down

Re: Make HTML widget appear on specific URLs

Post by Gangstar15 on 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
Forumember

Female Posts : 392
Reputation : 163

http://www.designdrops.net/

Back to top Go down

View previous topic View next topic Back to top


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