How to set my clickable banner to open in the same window? - internal

I created a banner that links to one of the pages on my website, but when I click it, it opens in a new tab. How can I make it internal, opening in the same window?

You have to set the target attribute of your link to _self. This is its default value and if you've not specified target attribute at all, it has to be opened in its own window. Here is an example:
link text
The target attribute specifies where to open the linked page.
For more information take a look at this reference at w3schools.com

Related

Want to make iframe go fullscreen when clicked

When you click on the 'featured properties' (which is simply iframed from my friends other site) it obviously attempts to open the website within that iframe, is there a way to code that so when clicked, it opens in full in another page?
Source: http://wiredpractice.com/jcr.html (it's in temporary housing right now)
Thanks!
You'll want to utilize this feature on an anchor tag:
<a target="_blank" >...</a>
You can use it on an existing link you've setup inside your iFrame or wrap your iFrame with an anchor tag that has the correct link and target property.
I'd recommend this site for more detail: http://www.w3schools.com/html/html_links.asp

Image in Page property in CQ5

I have set an image of type .jpg in image tab of page property. How can I fetch or access this image in the component JSP.
Thanks
Not being able to see what you have implemented I'm assuming this will save some properties to the page level based around the image such as its source.
This means you can then pull that out using
currentPage.getProperties().get("property","default");

Missing Dropdown in Component Styles Tab in CQ5

In the TextImage component, the Style tab has lost the css selection dropdown that used to show up when editing the component. It now just shows a blank area. It should have a dropdown for image alignment (left or right are your choices). This doesn't appear anymore.
This tab is xtype componentstyles (String), so I don't know where it references the source for the dropdown values. My local instance of CQ5 works just fine.
I cannot just add an xtype selection and feed it values because the css that gets added to the JSP code is outside the component's .jsp-specific page
It looks like the componentstyles xtype is driven by the CQ design that is associated to the page. Designs are stored underneath /etc/designs and are assigned through a page's Page properties dialog (cq:designPath property)
Let's look at an example in the Geometrixx website. If you navigate to the English homepage # /content/geometrixx/en.html and add an instance of the TextImage component to the page, you will notice that the Styles tab is empty in the component dialog. Now navigate to the 'Discover Geometrixx' page # /geometrixx/en/company/discover_geometrixx.html and examine one of the two pre-existing instances of the TextImage component. The Styles tab has the image dropdown you mentioned!
So what is the difference between the instances on the 'Discover Page' and the 'Home' page? The answer is in the design definition. If you open up CRXDE Lite and navigate to the Geometrixx design page for the Content Page template (which the 'Discover Geometrixx' page adopts), you will see the following nodes:
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign/image_left
/etc/designs/geometrixx/jcr:content/contentpage/par/textimage/cq:styles/imagealign/image_right
The design for the Homepage template (which the 'Home' page adopts) is missing this definition.
If you want to continue to use the out of box TextImage component, it seems you will need to have this design configuration set up on all the paragraph systems and templates where the component can go. So for example, if you want these styles to be available to the TextImage component when it is added to the par paragraph system of the Homepage template, you would add similar style nodes to:
/etc/designs/geometrixx/jcr:content/homepage/par/textimage/cq:styles
Alternatively you could just overlay the component and/or create your own. Then for this custom component you could create your own Styles dialog that is independent of the design. You can simulate the out of box behavior by examining the saved JCR property and setting the appropriate CSS class name in your render script.
The problem is that a design path variable went missing. We don't know why or how, but the solution is as follows.
Open up Content Repository
Go to /content/-sitefolder-/ and expand
Click on jcr:content and view properties
Check for attribute cq:designPath and its value
/etc/designs/-sitefolder-; add to properties if it doesn't exist

After clicking a link that loads into an iFrame how can I have the page go back to the top?

I have a list of links that are on the left side of my page that extend further down than my iframe on the right side of my page. how can I have it so that when I click a link and the iframe reloads that the window also resets to the top of the page?
EDIT: I tried doing an anchor but this wouldn't work because the content is in an iframe.
<a target="_blank|_self|_parent|_top|framename">
_blank Opens the linked document in a new window or tab
_self Opens the linked document in the same frame as it was clicked (this is default)
_parent Opens the linked document in the parent frame
_top Opens the linked document in the full body of the window
framename Opens the linked document in a named frame
_top will make the job for you
http://www.w3schools.com/tags/att_a_target.asp

Forms as modal windows

i got a form and i want to show it as window dialog and able to submit it via dialog
how i do that? what module i need?
also, how can i make that i get unique class for each form element?
The Popups module is awesome for this.
You can easily target a page (with your form), and it puts the content of the page in the popup. It opens it similarly to a lightbox, but it does not open a new browser window.
Drupal has a module for modals.
As for the unique class names in your form, this article may be helpful.

Resources