互联网技术 · 2024年2月10日

DEDECMS中调用当前栏目页和内容页面ID的方法

织梦DEDECMS获取当前栏目页或内容页面ID的方法:

一、当前栏目或者内页通用ID调用代码: {dede:field.id/};

二、或者你也可以用下面的代码

调用当前文章的ID:{dede:field.id/}

调用当前栏目的ID:{dede:field.typeid/}或者{dede:type}[field:id/]{/dede:type}

转载: 非常欢迎各位朋友分享到个人站长或者朋友圈,但转载请说明文章出处“黎青松SEO博客”。

原文地址: http://www.alitaohuo.com/CMSjiaocheng/zhimengjiaocheng/1843.html

$.getJSON(“/section/814.json”,function(data){var h = + data[0][title] + : + data[0][description] + ;$(#section-814).append(h);});

$.getJSON(“/section/637.json”,function(data){var channel_id =window.CHANNEL_ID ||0;var channel,default_channel;$.each(data,function(i,r){if (r.channel_id ==0) {default_channel =r;} if (r.channel_id ==channel_id) {channel =r;return false;} }) channel =channel ?channel :default_channel;if (channel &&channel.thumb) {var h =;$(#section-637).append(h);} });

OpenMagic API

Need more than content? Move into the product flow.

If you are here for model access, pricing, developer docs, or the future API console, the dedicated product path now lives on api.openmagic.ai.

登录免费注册