It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
Quite new to Sitecore. I need to develop a sliding image as shown on sitecore website below:
http://www.sitecore.net/
I'm cool with front-end Javascript. Could someone please help me design a template, items, components that's required to build on Sitecore? User should be able to change the images and text descriptions for the sliding content.
Thanks.
Create a new TemplateItem called e.g. SlideshowImageTemplateItem.
It should have a set of Fields that are necessary: Image, Description, Link, etc.
Now each of the images in the slideshow should be a separate Item in Sitecore tree created using the SlideshowImageTemplateItem.
Then create sublayout Slideshow and add a MultiList field to its rendering parameters which will allow you to select which slides should be displayed in the particular slideshow.
Did you take a look at the Nicam or JetStream demo sites available from Sitecore Partner Network (assuming you/your company have access)? Both have good examples of slider controls with editable text, all the Sitecore items and the related code to go with it. They also have the code changes required for a slightly different action in Page Editor mode, since you do not want the rotating action when you are editing.
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
in my project I have a list of project names and I'd like to edit the names with dynamic textboxes using angular.js. I'd like the textboxes of my projects names to become editable if I click on a button next to my project titles, and confirm the edition with another button when I'm done typing. Can I do such thing with angular.js ? I just finished the tutorial and am quite noob with it.
Actualy it is one of my most favorite example when I am doing AngularJS presentations to public :)
There is a code without single line of JS code:
http://plnkr.co/edit/ZwYA6R2e6kdhHBJAYf3V?p=preview
<span ng-hide="editing">
{{name}} <button ng-click="editing = true">Edit</button>
</span>
<span ng-show="editing">
<input type="text" ng-model="name">
<button ng-click="editing = false">Save</button>
</span>
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How can i retrieve the facebook post with the commnts and the profile pictures of the user through the single graph api call?
No need to fetch the image if you have the user_id of the commentor.
The URL to get the profile picture is
http://graph.facebook.com/{user_id}/picture
Infact, you can get three types of profile picture by using the graph API. That is,
http://graph.facebook.com/{user_id}/picture?type=small
http://graph.facebook.com/{user_id}/picture?type=square
http://graph.facebook.com/{user_id}/picture?type=large
P.S: I guess the types are self explanatory.
You must use batch requests in order to do that, the first request gets the comment and the seconds uses its results to get the pictures.
You should provide the batch parameter with the request as following:
batch=[
{
"method":"GET",
"name":"get-comments","relative_url":"<SOME POST ID>/comments",
},
{
"method":"GET",
"relative_url":"?ids={result=get-comments:$.data.*.from.id}&fields=picture"
}
]
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm working on a Facebook application and I need to select all my friends that are not fan of a specific page: any idea on how can I build the query?
UPDATE
I apologise, I'll try to be much more clear.
In my application I want to select all the friend that are not fan of a page, because I want to invite them to I Like the page.
Looking into the developer guide I read that is not possible to execute the SQL NOT IN, so using the FQL how is it possible to retrieve those friends who Not Like the page?
run this FQL query:
SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND uid IN (SELECT uid FROM page_fan WHERE uid IN (SELECT uid2 FROM friend WHERE uid1=me()) AND page_id='YOUR_PAGE_ID')=''
Edit:
You must has user_likes and friends_likes permissions in order to get this data
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.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm very new to Django and am trying to build my first good app. I've decided to try to rebuild a website of low complexity, and chose: http://trailertrack.me/
I was wondering if you could tell me which steps to take.
Right now, my views.py file looks like this (I'm only trying to show one specific video at the moment):
from django.http import HttpResponse
from django.shortcuts import render_to_response
import gdata.youtube
import gdata.youtube.service
yt_service = gdata.youtube.service.YouTubeService()
yt_service.ssl = True
def index(request):
message = "Welcome, and enjoy the show!"
context = {
'message': message,
}
return render_to_response('index.html', context)
def video(request):
t = loader.get_template('index.html')
specificentry = yt_service.GetYouTubeVideoEntry(video_id='1g4PLj0PlOM')
return HttpResponse(t.render(specificentry))
Thanks for your advice!
Okay, here's a broad outline of how I'd go about doing this. The order doesn't matter too much; there's obviously some dependencies among them, but do them in the order that you feel like tackling them.
Also, if you're new to this, I'd strongly recommend using either git or, if you're already familiar with it, mercurial for version control, and virtualenv for tracking dependencies.
Get your current views working, so that you can see that one specific video with a reasonable-looking template and so on.
Add a way to show more than that one video. One straightforward way to do this is to create a simple Django model for videos, with basically just a youtube ID, and turn on the admin site so you can add videos manually.
Make the view show a random video on each load.
Add a "next" button that just reloads the page. You can either use a django session variable / GET variable to avoid showing the same video again, or just assume it won't happen often enough to be a problem if you have a lot of videos.
Add a way to get new videos from Youtube (semi-)automatically. One way to do this:
Add an "is published" field to your video model, and have the user-facing site only show published videos.
Make a management command that does a Youtube search for "trailer" or something and adds new videos (unpublished) to the database. (Check for duplicate IDs at the very least.) Run that automatically in cron every few hours or days or whatever.
Go into the admin periodically and add new videos. If you want, you can make a custom admin view that shows a bunch of pending videos on a page, with their metadata, the actual video so you can watch it, and any other videos that might be duplicates in the system, along with AJAX publish and delete buttons. (The duplicates thing is a little harder! You can probably just do tf-idf weighting on the metadata to find similar videos.
Add a way for users to log in (the default Django users system, Facebook/Twitter integration, whatever) and like/upvote/maybe downvote videos. Remember these. Add video recommendations with some form of collaborative filtering.
You now have more features than the original site! Think of some other cool ones and implement them too. :)