1
我试图用它的标题而不是编号索引替换扩展图像的哈希标签链接。如何将title属性作为变量来替换prettyPhoto中的hashtag?
我已经设法从网址中删除不需要的编号,但我不知道如何检索标题。
当编辑JavaScript我已经改变了SetHashtag功能,这个prettyPhoto:
function setHashtag(){
var title = pp_titles;
if(typeof theRel == 'undefined') return; // theRel is set on normal calls, it's impossible to deeplink using the API
location.hash = theRel + '/'+title+'/';
};
在变量使用“pp_titles”虽然似乎从整个画廊把所有的标题,并将它们添加到末尾的网址。我只想使用当前图像的标题,但我不确定从哪里检索它。
您可以在任何这里的图片来看一个例子:http://www.sghalliday.com/urban2.html
我也想尝试,喜欢当用户退出画廊从URL的末尾删除主题标签,但是这不是什么大不了的目前。