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");
Related
I want to get the raw video data. I tried to inspect it, but there isn't a src attribute.
normal page:
The normal page
A page with only a video element
you have to leftclick the element and the click something like save audio
I want to display images in my website developed in asp.net(web form) dynamically. Like I have created a a page in admin section where I am uploading the image and the uploded image save in the folder and its path save in the database. Now uploading and edit on image is done by me. I want to display in my page in which I want to 4 images in a row. So what will be the control i need to use. or is there any other idea i can go for creating this task.
I am thanking you so for you ideas
You can use DataList or DataRepeater or any data control to Display Image. Its depend on requirement.
If you want show images on client side then use DataRepeater.
For display images in Datalist :
http://www.dotnetfox.com/articles/how-to-display-images-in-datalist-control-using-Asp-Net-with-C-Sharp-1037.aspx
Display images in Repeater :
http://ravisatyadarshi.wordpress.com/2012/11/17/how-to-display-an-image-gallery-using-repeater-in-asp-net/
You can use image control..
like,
e.g.-
Image1.ImageUrl = "~/uploads/"+imgstr+"";
here imgstr i variable in which you are getting image path from db
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
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
I've uploaded some data and images into the database. I want to retrive them by search button and show the searched values in DataList.
database
anil image
anil k image
kishore image
And the WebPage looks like this:
textbox[search button]
If Users enters anil in the search box the correspondent name and image should be displayed in DataList.
How can I get the data from database and build a DataList from it using asp.net and sql?
If you had a link to click that would open a new window to show the image, you could just return the image directly by changing the page response to stream the image bytes (and change the content type of the response appropriately). Since you need to display the image within the grid, the only way I can think of doing this (since you can't change the response of the request) is to request all of the files, save it temporarily on the server, and set an image link to the downloaded file.
this is webforms 101. there are numerous examples online. the "advanced" part is displaying images from a database. but again there are a number of examples on the web about displaying images stored in a database.