Joomla template displaying in iframe [closed] - templates

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have a site that requires an iframe for inserting a reservation widget into a Joomla article. I have no problems displaying the iframe in the article, but the problem is the template is also displaying in the article. It's as if the iframe wraps the entire site inside the article also. I only need the reservation widget to appear. You can see it here http://www.archersinn.com/reservations. The reservations widget is a third party my client uses so I just need to figure out how to display it properly. Any ideas?

You can show only the component using this parameter at the end of your joomla url
?tmpl=component
http://www.archersinn.com/reservations?tmpl=component
But you need to do this before this page.
In the page you insert your code for reservations you have style from Joomla, but is not joomla, I'm right?

In your iframe you are calling an external webpage. If you got control over the look and feel of the external widget site, you may configure that page to look like your current page - http://www.archersinn.com/reservations, with the introduction and title etc.
Instead of linking the menu item reservations to an article within your site, you may consider pointing the menu item to the external site - https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=H4LUxh0dk0&type=raw. Change the menu item type to External Link and set to open it in the parent window.

The iframe is pointing to https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw but that site has made a custom template for you so that it matches the look and feel of your website.
So it's not supposed to be an iframe at all. Just change the URL of the Reservation button to the following and you should be sorted: https://secure.rezovation.com/Reservations/CheckAvailability.aspx?s=w36FN02v7M&type=raw
Many booking systems do it this way. They have the booking engine on their own system and redirect back to your website at the end of the transaction.

Related

Sitecore 9 - Add an Image to a Link in the Footer

A client is using Sitecore 9 - we are not Sitecore developers.
We've been asked a simple thing: add social media links to the Footer of their Sitecore site.
Its proving more difficult than expected.
I've added the links on other pages by editing the HTML directly via the WYSWIG editor.
But the Footer appears more restricted, only accepting the addition of templates like 'Link'.
The 'Link' template has an option to add an external URL but doesn't have an option to add an image.
The CMS looks like this:
Is there any way to add a link, with an image, via the CMS (without the need to write Sitecore code), so the page chnages from this:
to this:
If you dont want to write Sitecore code, maybe you should think about using frontend.
Find the views that holds the footer (probably Foundation/Footer.cshtml) or something like that.
-To easily find where it is, follow these steps
Go to a content page Presentation Details that has footer (probably any)
Go to Controls
Find the footer rendering in there
Click on it
Grab the Datasource's value
Go to the Datasource's path
There should be a field holding the value of the view.
Add some css class on the div that holds those items, and do your frontend stuff in there...
It is not a scalable solution, so I would highly recommend updating the Footer rendering by adding new fields and adapting the model/view. So that way a content editor could easily add a new value for each socials.

One form across two pages django [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I want to create a form that does the following: the user specifies the number of questions that they want to ask and then on the next page, the user is able to fill out the relevant details pertaining to the number of questions that they to ask. I was wondering if there is a simple way to do this using django forms?
My approach is as follows:
I use one form to record the number of questions that the user wants to ask with a general description, then when the user clicks submit/next, the next view would create a form with those number of questions; however, I'm running into a complication when trying to use this method. I want to link the first form to the second form, but not sure how to because I can't preserve any information in the view from each call.
Is there a better way of going about this problem?
You certainly can preserve information between views. Perhaps the easiest way to do this is in URL parameters; your first view can redirect to "/second_view/?number_of_questions=5" and the second view can access request.GET['number_of_questions'].
An alternative, which is particularly useful if you have a lot of data, would be to use the session; add the data to the session on submit in the first view, and pop it out in the second.
In Django 1.8, the django.contrib.formtools module was moved into a separate package, django-formtools. It includes the FormWizard, which is the standard tool you'd use to create a form that spans multiple pages and/or steps.

webpage with home and about us link with edit button using ember js

Simply I want single application page, in that there should be two navigation menus Home and About Us by clicking on that the related content should open in same page as well as there should be edit button where i can edit contents and Menu's link using Ember Js. Please Help.
this is not much of a question
but to answer the somewhat ambiguous question that you are perhaps asking where you could start,
try these starting as a starting point
the Ember Guide's Getting Started
This Tutsplus' dive into Ember
or this In-depth-guide on smashing
I found it easier to start with a static page without a server

Create Spotify Playlist from List of Albums [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
I have a long-running list of favorite albums. I know sites like www.spotmysongs.com will take a text file of a list of artists and song titles and create a playlist out of them on Spotify, but I'd like to do the same with a list of albums, without taking the time to list every track on the album.
For example I want to have it say:
Daft Punk Random Access Memories
Cults Cults
and have it load those two whole albums together into a playlist. Any idea if this is possible or how to do it?
You could make a request to http://ws.spotify.com/search/1/album?q=daft%20punk%20random%20access%20memories
http://ws.spotify.com/lookup/1/?uri=spotify:album:4m2880jivSbbyEGAKfITCa&extras=track to get the tracks on that album.
As for programmatically adding them to a playlist, there is currently no official way of doing this. However, here is a hack you can use by opening up the web player in the devtools console. The example code will create a playlist and add a track. You could combine this with the above steps.
window.frames[0].require("$api/models", function(models) {
models.Playlist.create("My cool playlist").done( function(playlist) {
playlist.load("tracks").done( function(){
playlist.tracks.add( models.Track.fromURI("spotify:track:3KRAqo71NrfR1UCa34JEsy").done(function(){
})
})
})
})
You could write a browser extension to do this. Or, supposing you had a large JSON list of tracks that you want to append, you could modify the above example to add all the tracks sequentially.
Alternately, you could try using something like https://github.com/liesen/spotify-api-server, until Spotify gets their act together and gives you an official API.
Thought I would enter a new answer that works better now that the spotify web api is available. You can now make supported API calls to create a playlist and add tracks to a playlist.

How could I allow copy editors for my Django site to create internal links in a DRY manner? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My Django site is an ecommerce store. Relatively nontechnical copy editors will be logging into the Django admin interface and writing the copy for each of the product pages. They have told me that they want to be able to create links in this copy to other pages on the site. For example, if a product references another product in its description, they want to link between the pages.
I see a couple of possible options:
They simply hardcode the urls in <a> tags in the copy. I've set up ckeditor for the admin textareas so this would be the simplest solution, but if the url structure of the site ever changed, (say we changed them for SEO purposes) all the links would break.
Introduce some sort of wiki syntax where they surround the text that they want the links to be in square brackets. Something like:
Widget A works really well with [[Widget B]]. It is good.
would produce:
Widget A works really well with Widget B. It is good.
Then you have the problem of what happens if the product's name changes?
Has anyone dealt with this problem before and come up with a solution that is flexible enough to allow changing links/names/etc?
I deal with this issue frequently. Ultimately, you have to be very persuasive to convince me to allow embedding links directly into the copy--especially with an e-commerce website.
What if the product name changes or is re-branded?
What if the product is discontinued... you don't want 404 errors from your internal links.
Do you really want to lead people away from your "add to cart" call to action that high up on the page?
Do they know your SEO strategy? Are they going to dilute your links? What verbiage will they use? Will they ensure the link is valid?
When I am asked to give copy/product development team the ability to add links I always start with a No. Ask them what they need them for, explain the problems that can arise (eg. extra cost in maintaining valid links, conversion rate considerations, SEO considerations), and offer alternative solutions.
For example, I usually offer the ability to allow them to associate products with products as "Associated Products", "Related Products", "Accessories", "More Information" etc. You can have these in tabs or lists at the bottom of the product page. These would be in models and thus you have control over not displaying discontinued products, the link names are the product names (which you have SEO control over), etc. Determine if they are going for cross-selling, up-selling, or providing the end user with more information.
As a last resort I have also used a custom code parser which is again based on the target object and not a hard-coded link. For example, let's say you give them the ability to do:
Widget A works really well with [product=123].
A custom template tag, parser in your model/view can replace that with a link to the the Product with id=123 (or use slug) based on get_absolute_url(). If the product is discontinued, the name can still show but no link. This only works if you have a policy of never deleting records. Even then, you may have to have some error handling for when they enter an invalid product ID or somebody does delete that product. That will happen.