Umbraco template issues - asp.net

Hi fellow Umbraco users,
I'm currently building my first umbraco website and since I'm completely new to umbraco I've already ran into a problem which I'm sure is pretty straight-forward to do.
That said, I'm by no means a beginner when it comes to building sites that run on a (open source) CMS as I've been using Joomla! since it was called Mambo.
Anyway, the site I'm building is here: my site
What I want to do is to have some content in the white box that changes when you mouseover/hover one of the menu items. Also that content has to stay "active" when you've clicked on a link (i.e. if you click on "Profile" I need to highlight the Profile menu item with the gray color and the white boxs content needs to be what would be related to the Profile menu item.
How do I go about this? What would be the best practice when it comes to showing multiple content on a site? I've watched the video about multiple Content Place Holders, but I never really got it to work. I can't get a page to display in the NavigationPlaceHolder (the placeholder I put in the white box), but thats because the actual page is Frontpage.aspx and not WhateverIsInThenavigationPlaceHolder.aspx. If I go to the mysite.dk/WhateverIsInTheNavigationPlaceHolder.aspx it shows up fine.
What have I missed here? :)
Thanks in advance! If my question is not clear in some ways, please tell me and I will try to explain it better.
All the best,
Bo

It's a little confusing what you're asking with seeing your implementation, but here is a shot at what I might do:
Rather than trying to do this through the templating system, I'm pretty sure you want to create a user control to add to your page template. (Add it in the template as a macro.) I would use and XSLT control here with this as the basic output:
<xsl:variable name="subContentNodes" select="$currentPage/node[#nodeTypeAlias='yourContentNodeType']">
<ul id="content-items-nav">
<xsl:for-each select="$subContentNodes">
<li><xsl:value-of select="data[#alias='pageBody']" disable-output-escaping="yes" /></li>
</xsl:for-each>
</ul>
and then later
<div id="content-items">
<xsl:for-each select="$subContentNodes">
<div id="subnode-{#id}"><xsl:value-of select="data[#alias='pageBody']" disable-output-escaping="yes" /></div>
</xsl:for-each>
</div>
It looks like you're already including jQuery on your page, so I would then add a script to handle the clicking:
$("#content-items-nav a").bind("click", function(e) {
e.preventDefault();
var contentDiv = $(this).attr('href');
$("#content-items div").hide();
$(contentDiv).show();
$(this).addClass("active");
});
Hope that helps you some. I found there is quite a learning curve to umbraco, but it is quite powerful when you get into it.
(Note: I haven't syntax checked any of the code)

Related

Zoho Creator in iframe adds blank lines - how do we stop that behavior

We use Zoho creator which allows us to generate iframe "code" to embed in html.
When we do that, additional blank lines are added to the end of the displaed results.
You can see what I mean on this page I created to illustrate the issue:
https://themezz.com/zoho/index.html - it has 5 lines of text with the iframe tucked it; yet many blank lines are added. View page source please.
Also tried many variations of the height and width tags with negative results.
https://themezz.com/zoho/index2.html
The ultimate goal is to embed that chart into a Wordpress theme, which I have done, but of course all the additional blank lines appear which look like crap. I embedded it in the Wordpress php, as well as tried as a widget, and also ran it through feedburner as RSS THEN into Wordpress with all poor results.
I think it's a Zoho issue, but their tech support has not replied nor has anyone in the Zoho support community.
Perhaps someone can think of a solution, or a workaround for eliminating these blank lines.
Appreciate your time.
Do you want it to look like this
i have tried it in zoho creator pages ,only change being done is in height attribute
code:
<html>
<p>every</p> <p>good</p> <p>boy</p> <p><iframe src="https://creator.zohopublic.com/kyl184/resource-dispatch/view-embed/Embed_page/yRSBBntzf7Au4MrZ6k6rnB1mjD46uYmSpeW1bUdwpVzCFmJKdwn6Ssr7YOs3Aa1A5D261uUXx22aOXAPOdHgxPeJ6BE2rbg3eeSR?" width="800px" height="300px" frameborder="0" scrolling="no"></iframe> </p> <p>does</p> <p>fine</p>
here is a demo page view from wordpress containing your iframe data

Using Html Anchor on my web site

I am using weebly site builder and so just a beginner on Html coding. I am having issues making anchors work on my pages. They seem to work on some systems and not others, and so I think there must be a better method.
Here is what I am doing
I have a guest author page and I want each guest, to have a direct link to his section of the web page
I set up an anchor as follows
Then use the following link to it
http://arthurvaso.weebly.com/guests2016.html/#smith2
On some computers/broswers this works just fine, in others, it just goes to the Top of the page instead of the section I want.
I basically have pages I want to make direct links to
Poet1
Poet2
Poet3 etc
I search here, an all the posts were either years old, or not exactly the answer I was looking for. It seems the newer the browser version, the less my method works.
I really appreciate any help, thanks!
There is a little trick to it, but it's an easy fix for you. You are missing in your Anchor.
Change:
<a id="smith2"></a>
To:
<a id="smith2"> </a>
Make sure to publish the changes.
And, note that your Anchor Link should be:
http://arthurvaso.weebly.com/guests2016.html#smith2
without the / after .html

99% of the way to getting a Lightbox caption link to work…

...or that's how it feels at least :)
I know similar Lightbox link questions have been asked before but I'm not sure they applied exactly to my situation. I am trying to set it up so that a link in the Lightbox title/caption opens the full size image. In other words, on my page, I have a thumbnail, then if I click on that, it opens a detail (in Lightbox), then below that Lightbox popup would be some text, and a link to view an even larger image (ideally as a Lightbox popup.) I have read a bunch of other threads and followed the instructions to change the <> to html values, etc. and I think I'm nearly there, but it's not quite working. The link is showing up properly in my code, and I get a finger pointer when I hover over the link, but for some reason nothing happens when I click it. I can right click and open the link in new window, and that works, but apparently something (in the Lightbox code?) is preventing it from working on the page.
I guess what I'm wondering is:
Is this possible?
Is it relatively simple (I have no experience with Javascript/Jquery…)
Is it possible to have a link in a Lightbox popup open another Lightbox popup?
Is there an option other than Lightbox that will allow this (Colorbox? Slimbox?)
Here is my code so far:
<img src="<?php echo $image->url() ?>" width="<?php echo $image->width() ?>" height="<?php echo $image->height() ?>" alt="<?php echo $image->name() ?>" />
Here is an example of how it's outputting:
<div class="item" style="width: 194px; margin: 3%;">
<img src="http://www.chrissvensson.info/ces85/content/035-035/DSC_3335.jpg" width="194" height="300" alt="DSC_3335" /></div>
Just to clarify, I am using Lightbox 2.5.1 (http://lokeshdhakar.com/projects/lightbox2/)
Thanks so much for any help you might be able to provide. And again, I apologize if this has been answered before…
It's quite hard to tell exactly what you've got so far without you posting a little more of your code, but I can try to go through a couple of the very basics of what you need to do.
Firstly, most lightbox style plugins are based on jQuery, which means you're going to run some javascript code on the client side.
Your PHP will generate the static content which gets everything set up, then you need to run the jQuery plugin which will do lots of magic and convert it into a lightbox. As you didn't mention which plugin you're using I'll go with fancybox, as I think it has a lot of nice options: http://fancybox.net/howto. I won't go through all the boring set up details as they're already on the site, but here's the two most important bits:
you need to set up an image, encapsulated by a link, like the example given. Your PHP should dynamically generate this, similar to what you've done already.
<a id="image_id" href="image_big.jpg"><img src="image_small.jpg" alt=""/></a>
Before any javascript, it's just a thumbnail of the image (image_small.jpg) that links through to the full sized one (image_big.jpg)
Now to make this actually work, you need to point the javascript plugin at the link you just made.
I would advise you read through some basic jQuery documentation or tutorials like this one, as you'll find the library really useful, but long story short, to select an element by id in jquery, you would use this: $('#image_id').
All you need to do then, is run fancybox on this link when the plugin loads:
$('#image_id').fancybox();
The best place to put this is within jQuery's $(document.ready(function(){/*your code in here*/}) which is call when the page is loaded.
With fancybox, to add a caption/title when the window opens, you just need to add a caption="caption here" attribute into the <a> anchors that you create.
Regarding your question about a lightbox popup within a lightbox popup, it is entirely possible, but you'd have to do a little bit of extra javascript wizardry. My advice would be to consider the user experience and find an alternative (perhaps just allow the user to download the massive image, or look for plugins that allow you to zoom in to something), because opening two modal dialogues sounds quite confusing for the user!
Anyway, hope this helps.

Drupal6: Theming Node Edit pages / Opening within Lightbox

I'm trying to display all node_edit form neatly within a lightbox without any of the excess content I don't want. No sidebars, footer, header, nothing. Just the content. So I created a page-node-edit.tpl.php file.
I have two problems daunting me, but for now I'll only mention the first since its more important.
1) From any drupal page, clicking on the "edit" link for the node doesn't activate the lightbox like it should. Instead it clicks-thru the link as normal.
With jQuery in the header I added a rel attribute for the lightbox to the links, but the box still doesn't activate. I tested the lightbox on a link I hardcoded into the page, and it activated just fine. For elements generated by Drupal, like the node edit link/button the problem seems to be timing.
I think the rel attribute needs to be built with the page, with the link, rather than appended onto it. The catch is, the link lacks an id and class, so I don't see how the hook_alter_link() function can help me.
I'm willing to try anything. Perhaps someone has done this before? Opened a node/edit form within a lightbox.
Any suggestions would be greatly appreciated.
I've seen the Modal Frame API used in a few modules (Node Relationships uses it to do something very similar to what you're doing); might be helpful...
http://drupal.org/project/modalframe

cant find a way to show inline content from the same page using lightbox2

i am using the lightbox2 module in my drupal site.
i would like to be able to trigger the lightbox on content that lies withing the same page.
something like this:
<a rel="lightbox" href="#">Show content in light box</a>
<div id="content_to_show">the content i want to show in my light box</div>
cant figure out a way to do that.
any help ?
well after searching around, i have came to the conclusion that lightbox is not the proper plug in to use.
instead i am using the colorbox plugin at http://colorpowered.com/colorbox/ which has this capability integrated, and simple to use.

Resources