developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 12 years ago

#657 closed enhancement (fixed)

jResponseHtml - allow to add generic links on the fly

Reported by: ametaireau Owned by: laurentj
Priority: lowest Milestone: Jelix 1.1 beta 1
Component: jelix:core response Version: trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

Actually, if we want to add some links to the header section of an html response, we have to do it by hand.

for an rss feed for instance:

$resp->addHeadContent('<link rel="alternate" type="application/rss+xml" title="Actualités" href="'.jUrl::get('news~news:rss').'" />');

This path allow to use this syntax instead

$resp->addLink(jUrl::get('news~news:rss'),'alternate','application/rss+xml', 'actualités');

I made some improvements to the jResponseHtml class (add the addLink($href, $rel, $type, $title=) method)

Attachments (2)

patch.diff (4.0 KB) - added by ametaireau 12 years ago.
patch.2.diff (4.0 KB) - added by ametaireau 12 years ago.

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by ametaireau

comment:1 Changed 12 years ago by ametaireau

Also, I delete the

if(count($this->_CSSIELINKS)

in outputDoctype method which is useless here

Changed 12 years ago by ametaireau

comment:2 Changed 12 years ago by laurentj

  • Milestone set to Jelix 1.1 beta 1
  • Resolution set to fixed
  • review changed from review? to review+
  • Status changed from new to closed

Ok for me. Patch landed into the trunk. Thanks for this patch.

Note: See TracTickets for help on using tickets.